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
aesKeyof 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-bytepeerPublicKeyand 32-bytesecretKey. Throws on invalid lengths; throwsCryptoExceptionon a zero shared secret. -
salsaBoxDecrypt(
List< int> nonce, List<int> sealed, {required List<int> peerPublicKey, required List<int> secretKey}) → BuBytes? -
NaCl
crypto_box_open_easydetached decrypt with explicit 24-bytenonce. Returns plaintext, ornullon 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_easydetached encrypt with explicit 24-bytenonce: returnsTAG || CIPHERTEXT(authenticator first). Throws on invalid lengths. -
salsaBoxOpen(
List< int> prefixed, {required List<int> peerPublicKey, required List<int> secretKey}) → BuBytes? -
Opens a
NONCE || TAG || CIPHERTEXTblob. Returns plaintext, ornullwhen 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: returnsNONCE || 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