Aead class final
An AEAD cipher bound to a key.
Constructors
-
Aead.aes128Gcm(List<
int> key) -
AES-128-GCM with a 16-byte
key.factory -
Aead.aes256Gcm(List<
int> key) -
AES-256-GCM with a 32-byte
key. Nonce: 12 bytes recommended (other lengths are accepted by GCM and passed throughEVP_CTRL_AEAD_SET_IVLEN).factory -
Aead.chacha20Poly1305(List<
int> key) -
ChaCha20-Poly1305 (RFC 8439) with a 32-byte
keyand 12-byte nonce.factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
List< int> nonce, SealedBox box, {List<int> aad = const []}) → Uint8List -
Verifies and decrypts
box. Throws AuthenticationException on any mismatch of key, nonce, AAD, ciphertext or tag. -
openCombined(
List< int> nonce, List<int> combined, {List<int> aad = const []}) → Uint8List -
Convenience:
openonciphertext || tag. -
seal(
List< int> nonce, List<int> plaintext, {List<int> aad = const []}) → SealedBox -
Encrypts and authenticates
plaintextwithnonceand optionalaad. -
sealCombined(
List< int> nonce, List<int> plaintext, {List<int> aad = const []}) → Uint8List -
Convenience:
sealreturningciphertext || tag. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited