Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (Aes myAes = Aes.Create())
- {
- // Encrypt the string to an array of bytes.
- byte[] encrypted = EncryptStringToBytes_Aes(original,
- myAes.Key, myAes.IV);
- // Decrypt the bytes to a string.
- string roundtrip =
- DecryptStringFromBytes_Aes(encrypted,
- myAes.Key, myAes.IV);
- }
Add Comment
Please, Sign In to add comment