Class ChaCha20Poly1305
Namespace: Algorand.Unity.Crypto
Assembly: cs.temp.dll.dll
Syntax
public static class ChaCha20Poly1305
Methods
Decrypt(Span<Byte>, ReadOnlySpan<Byte>, ChaCha20Poly1305.Key, ChaCha20Poly1305.Nonce)
Declaration
public static ChaCha20Poly1305.DecryptionError Decrypt(Span<byte> message, ReadOnlySpan<byte> cipher, ChaCha20Poly1305.Key key, ChaCha20Poly1305.Nonce nonce)
Parameters
Type | Name | Description |
---|---|---|
Span<Byte> | message | |
ReadOnlySpan<Byte> | cipher | |
ChaCha20Poly1305.Key | key | |
ChaCha20Poly1305.Nonce | nonce |
Returns
Type | Description |
---|---|
ChaCha20Poly1305.DecryptionError |
Encrypt(Span<Byte>, ReadOnlySpan<Byte>, ChaCha20Poly1305.Key, ChaCha20Poly1305.Nonce)
Encrypt a message using the ChaCha20Poly1305 algorithm.
Declaration
public static ChaCha20Poly1305.EncryptionError Encrypt(Span<byte> cipher, ReadOnlySpan<byte> message, ChaCha20Poly1305.Key key, ChaCha20Poly1305.Nonce nonce)
Parameters
Type | Name | Description |
---|---|---|
Span<Byte> | cipher | The encrypted message. |
ReadOnlySpan<Byte> | message | The message to encrypt. |
ChaCha20Poly1305.Key | key | The symmetric key to encrypt with. |
ChaCha20Poly1305.Nonce | nonce | The 12 byte iv to use to encrypt. |
Returns
Type | Description |
---|---|
ChaCha20Poly1305.EncryptionError |