c# - Best way to 'hide' pass phrases, init vectors etc.. for encryption in a class library -


I'm adding some encryption methods to a class library (C # 2.0) and knowing the best place to keep it Want to pass pass phrase, salt value and initial vector required. Is it really bad code that they have to work harder in DLL, or should I encode them and store them somewhere else?

Thank you.

Edit: Additional information - Required encryption, bank / medical type information required for personal information (addresses, phone numbers, etc.) in the database, so the solution is very difficult -Core does not have to be classed The class library will be used on a web-app server, encryption methods will be used in the data layer.

If you are using public key encryption, you can see the public key (most likely) Want to freely distribute and access private keys to highly restricted (only on storage media that you know are safe). Either way, it is specific to store key in the form of base 64-encoded strings in XML files. To do this, I believe in the RSACryptoServiceProvider class has the underlying capability.


Comments