Class AesGcmCipher
- Namespace
- NArk.ArkadeIntents.Lightning
- Assembly
- NArk.ArkadeIntents.dll
The platform implementation, used everywhere except the browser.
public sealed class AesGcmCipher : IAesGcmCipher
- Inheritance
-
AesGcmCipher
- Implements
- Inherited Members
Methods
EncryptAsync(byte[], byte[], byte[], byte[], CancellationToken)
Encrypts plaintext under AES-256-GCM.
public Task<byte[]> EncryptAsync(byte[] key, byte[] nonce, byte[] plaintext, byte[] associatedData, CancellationToken cancellationToken = default)
Parameters
keybyte[]32-byte key.
noncebyte[]12-byte nonce, never reused under the same key.
plaintextbyte[]What to encrypt.
associatedDatabyte[]Authenticated but not encrypted.
cancellationTokenCancellationTokenCancels the operation.