AesCcm Constructors

Definition

Overloads

AesCcm(Byte[])

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

AesCcm(ReadOnlySpan<Byte>)

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

AesCcm(Byte[])

Source:
AesCcm.cs
Source:
AesCcm.cs
Source:
AesCcm.cs

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

public AesCcm (byte[] key);

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

.NET 9 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.1

AesCcm(ReadOnlySpan<Byte>)

Source:
AesCcm.cs
Source:
AesCcm.cs
Source:
AesCcm.cs

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

public AesCcm (ReadOnlySpan<byte> key);

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

.NET 9 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.1