NativeAEADApi class
AEADApi backed by a native (FFI/platform) implementation.
- Implemented types
Constructors
- NativeAEADApi(BuAeadApi api)
-
const
Properties
- api → BuAeadApi
-
final
- 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.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-bytepeerPublicKeyand 32-bytesecretKey. Throws on invalid lengths; throwsCryptoExceptionon 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_easydetached decrypt with explicit 24-bytenonce. Returns plaintext, ornullon 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_easydetached encrypt with explicit 24-bytenonce: returnsTAG || 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 || CIPHERTEXTblob. Returns plaintext, ornullwhen 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: returnsNONCE || 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