salam guyz
i just made an application which generate a file for me, ok now i want to encrypt that file so when ever someone trys to reead it's contents so he/she should cant (because of security) now can any body help me!!!!
if u help me i will be very happy thanks.

1 answers
There are several ways to encrypt a file in .NET and which one you choose depends on how secure you want the encryption to be and how quickly you need the algorithm to work.
One of the easier ways is to use 'Windows Data Protection' (wrapped by the ProtectedData class in the .NET Framework) which works quickly and is moderately secure.
Check out this thread for some example code.
answered one year ago by:
17279
45
how about md5 algorithm or S/MIME protocol??
17279
Well, MD5 is a one-way encyption algorithm used for hashing (checksums etc) and so you wouldn't be able to decrypt the file after you'd encrypted it. S/MIME is a two-way system for e-mail etc. which uses public key encryption but, to my knowledge, it's not supported in the .NET framework. However, the framework does support Rijndael (same key) and RSA (public key) for two-way encryption.