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 through EVP_CTRL_AEAD_SET_IVLEN).
factory
Aead.chacha20Poly1305(List<int> key)
ChaCha20-Poly1305 (RFC 8439) with a 32-byte key and 12-byte nonce.
factory

Properties

algorithm → String
OpenSSL algorithm name, e.g. AES-256-GCM.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tagLength → int
Tag length in bytes (16).
final

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: open on ciphertext || tag.
seal(List<int> nonce, List<int> plaintext, {List<int> aad = const []}) → SealedBox
Encrypts and authenticates plaintext with nonce and optional aad.
sealCombined(List<int> nonce, List<int> plaintext, {List<int> aad = const []}) → Uint8List
Convenience: seal returning ciphertext || tag.
toString() → String
A string representation of this object.
inherited

Operators

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