ValidatedAEADApi class

AEADApi wrapper that validates key length before delegating.

Implemented types

Constructors

ValidatedAEADApi(AEADApi _inner)
const

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.
override
chacha20Poly1305(List<int> key) → BuAead
Creates ChaCha20-Poly1305 AEAD from 32-byte key. Throws on invalid length.
override
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.
override
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).
override
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.
override
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).
override
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.
override
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.
override

Operators

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