[ Download Code ] | [ Download Help ]
When using the encryption assembly, you may refer to the windows form example attached to the solution.
The way you use this article's implementation is quite simple.
string password = "MyPassword1s123";
KraGiE.TripleDES des = new KraGiE.TripleDES();
des.SetKeys = "Whatever your Private-Key Is";
des.SetMode = KraGiE.TripleDES.CipherMode.CipherBlockChaining;
string encrypted = des.Encrypt(password);
System.Diagnostics.Debug.WriteLine(encrypted);
string decrypted = des.Decrypt(encrypted);
if (password == decrypted)
System.Diagnostics.Debug.WriteLine("Success");
else
System.Diagnostics.Debug.WriteLine("Kay doesn't know what he's talking about.");
des = null;
Just remember that you need to either use the SetKeys property or manually set the Key and IV properties with 24 byte and 8 byte arrays respectively. Based on the parameter type of the Encrypt and Decrypt method, you'll receive the same type back.