Guest User

Untitled

a guest
Jan 17th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. using (Aes myAes = Aes.Create())
  2. {
  3.  
  4. // Encrypt the string to an array of bytes.
  5. byte[] encrypted = EncryptStringToBytes_Aes(original,
  6. myAes.Key, myAes.IV);
  7.  
  8. // Decrypt the bytes to a string.
  9. string roundtrip =
  10. DecryptStringFromBytes_Aes(encrypted,
  11. myAes.Key, myAes.IV);
  12.  
  13.  
  14. }
Add Comment
Please, Sign In to add comment