The attached sample code encrypts your file by 16 and 32 key secret and decrypts back by 16 and 32 Key.
Include #using System.Security.Cryptography namespace in your project before you can use the class. The sample code looks like the following:
Rijndael alg = Rijndael.Create(); alg.Key = pdb.GetBytes(16); alg.IV = pdb.GetBytes(16); CryptoStream cs = new CryptoStream(ms, alg.CreateEncryptor(), CryptoStreamMode.Write); cs.Write(clearBytes, 0, clearBytes.Length); cs.Close(); byte[] encryptedData = ms.ToArray();ANOTHER LINKS:http://mfc-project.blogfa.com/post-23.aspxOR:http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=7468&lngWId=10ENJOY IT.