code_junkie

How to store the AES Rijndael generated Key to the database?

Nov 12th, 2011
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. RijndaelManaged myRijndael = new RijndaelManaged();
  2.  
  3. RijndaelManaged myRijndael = new RijndaelManaged();
  4.  
  5. // to Base64
  6. string keyb64 = Convert.ToBase64String(myRijndael.Key);
  7.  
  8. // reverse
  9. myRijndael.Key = Convert.FromBase64String(keyb64);
Add Comment
Please, Sign In to add comment