EncryptUtilities.EncryptStringToBytes_Aes(String, Byte[], Byte[]) Method

Definition

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

Tuple<Byte[],Byte[]>

The initialization vector and the encrypted bytes.

Applies to