Initializes a new ChaCha20Poly1305 instance with the provided key.
Namespace:
Rebex.Security.Cryptography
Assembly:
Rebex.Common (in Rebex.Common.dll)
Syntax
Visual Basic |
---|
Public Sub New ( _ key As Byte() _ ) |
C# |
---|
public ChaCha20Poly1305( byte[] key ) |
Parameters
- key
- Type: array<System..::..Byte>[]()[][]
The 32-byte ChaCha20/Poly1305 key to be used by this instance. An instance of the ChaCha20Poly1305 class makes, uses, and clears a copy of the key. An instance of the ChaCha20Poly1305 class IS NOT the owner of the key and the key WILL NOT be cleared when the Dispose()()()() method is called. The owner of the key should clear the key.