AesGcm Constructors

Definition

Overloads

AesGcm(Byte[])

Initializes a new instance of the AesGcm class with a provided key.

AesGcm(ReadOnlySpan<Byte>)

Initializes a new instance of the AesGcm class with a provided key.

AesGcm(Byte[])

Initializes a new instance of the AesGcm class with a provided key.

public:
 AesGcm(cli::array <System::Byte> ^ key);
public AesGcm (byte[] key);
new System.Security.Cryptography.AesGcm : byte[] -> System.Security.Cryptography.AesGcm
Public Sub New (key As Byte())

Parameters

key
Byte[]

The secret key to use for this instance.

Exceptions

The key parameter is null.

The key parameter length is other than 16, 24, or 32 bytes (128, 192, or 256 bits).

Applies to

AesGcm(ReadOnlySpan<Byte>)

Initializes a new instance of the AesGcm class with a provided key.

public:
 AesGcm(ReadOnlySpan<System::Byte> key);
public AesGcm (ReadOnlySpan<byte> key);
new System.Security.Cryptography.AesGcm : ReadOnlySpan<byte> -> System.Security.Cryptography.AesGcm
Public Sub New (key As ReadOnlySpan(Of Byte))

Parameters

key
ReadOnlySpan<Byte>

The secret key to use for this instance.

Exceptions

The key parameter length is other than 16, 24, or 32 bytes (128, 192, or 256 bits).

Applies to