AEADApi class abstract interface

Constructs AEAD ciphers (ChaCha20-Poly1305, XSalsa20-Poly1305, AES-GCM)

from raw keys.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

aesGCM(List<int> aesKey) → BuAead
Creates AES-GCM AEAD from aesKey of 16, 24 or 32 bytes. Throws on invalid length.
chacha20Poly1305(List<int> key) → BuAead
Creates ChaCha20-Poly1305 AEAD from 32-byte key. Throws on invalid length.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
salsaBoxBeforenm({required List<int> peerPublicKey, required List<int> secretKey}) → BuBytes
NaCl crypto_box_beforenm: derives the 32-byte transport key from 32-byte peerPublicKey and 32-byte secretKey. Throws on invalid lengths; throws CryptoException on a zero shared secret.
salsaBoxDecrypt(List<int> nonce, List<int> sealed, {required List<int> peerPublicKey, required List<int> secretKey}) → BuBytes?
NaCl crypto_box_open_easy detached decrypt with explicit 24-byte nonce. Returns plaintext, or null on authentication failure. Throws on invalid key/nonce lengths (never on attacker ciphertext).
salsaBoxEncrypt(List<int> nonce, List<int> plaintext, {required List<int> peerPublicKey, required List<int> secretKey}) → BuBytes
NaCl crypto_box_easy detached encrypt with explicit 24-byte nonce: returns TAG || CIPHERTEXT (authenticator first). Throws on invalid lengths.
salsaBoxOpen(List<int> prefixed, {required List<int> peerPublicKey, required List<int> secretKey}) → BuBytes?
Opens a NONCE || TAG || CIPHERTEXT blob. Returns plaintext, or null when truncated or unauthenticated. Throws on invalid key lengths (never on attacker input).
salsaBoxSeal(List<int> nonce, List<int> plaintext, {required List<int> peerPublicKey, required List<int> secretKey}) → BuBytes
NaCl box with explicit 24-byte nonce, nonce-prefixed framing: returns NONCE || TAG || CIPHERTEXT. Throws on invalid lengths.
toString() → String
A string representation of this object.
inherited
xsalsa20Poly1305(List<int> key) → BuAead
Creates XSalsa20-Poly1305 AEAD (NaCl secretbox) from 32-byte key. Strict 24-byte nonce. Throws on invalid length.

Operators

operator ==(Object other) → bool
The equality operator.
inherited