EncryptUtilities.EncryptStringToBytes_Aes(String, Byte[], Byte[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encrypts a string using Advanced Encryption Standard (AES).
public static Tuple<byte[],byte[]> EncryptStringToBytes_Aes (string plainText, byte[] key, byte[] iv = default);
static member EncryptStringToBytes_Aes : string * byte[] * byte[] -> byte[] * byte[]
Public Function EncryptStringToBytes_Aes (plainText As String, key As Byte(), Optional iv As Byte() = Nothing) As Tuple(Of Byte(), Byte())
Parameters
- plainText
- String
The text to encrypt.
- key
- Byte[]
The 32-byte encryption key to use.
- iv
- Byte[]
A 16-byte initialization vector to use.
Returns
The initialization vector and the encrypted bytes.