ChaCha20Poly1305 Constructors

Definition

Overloads

ChaCha20Poly1305(Byte[])

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

ChaCha20Poly1305(ReadOnlySpan<Byte>)

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

ChaCha20Poly1305(Byte[])

Source:
ChaCha20Poly1305.cs
Source:
ChaCha20Poly1305.cs
Source:
ChaCha20Poly1305.cs

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

C#
public ChaCha20Poly1305(byte[] key);

Parameters

key
Byte[]

The secret key to use for this instance.

Exceptions

The key parameter length is not 32 bytes (256 bits).

Applies to

.NET 10 i druge verzije
Proizvod Verzije
.NET 6, 7, 8, 9, 10

ChaCha20Poly1305(ReadOnlySpan<Byte>)

Source:
ChaCha20Poly1305.cs
Source:
ChaCha20Poly1305.cs
Source:
ChaCha20Poly1305.cs

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

C#
public ChaCha20Poly1305(ReadOnlySpan<byte> key);

Parameters

key
ReadOnlySpan<Byte>

The secret key to use for this instance.

Exceptions

The key parameter length is not 32 bytes (256 bits).

Applies to

.NET 10 i druge verzije
Proizvod Verzije
.NET 6, 7, 8, 9, 10