ChaCha20Poly1305 class
The original ChaCha20-Poly1305 construction
Constructors
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decrypt(
Uint8List cipherText, Uint8List nonce, Uint8List key, {Uint8List? additionalData}) → Uint8List - Verifies and decrypts a cipher text produced by encrypt.
-
decryptDetached(
Uint8List cipher, Uint8List mac, Uint8List nonce, Uint8List key, {Uint8List? additionalData}) → Uint8List - Verifies and decrypts a cipher text and mac produced by encrypt detached.
-
decryptString(
Uint8List cipherText, Uint8List nonce, Uint8List key, {String? additionalData}) → String - Verifies and decrypts a cipher text produced by encrypt.
-
decryptStringDetached(
Uint8List cipher, Uint8List mac, Uint8List nonce, Uint8List key, {String? additionalData}) → String - Verifies and decrypts a cipher text and mac produced by encrypt detached.
-
encrypt(
Uint8List value, Uint8List nonce, Uint8List key, {Uint8List? additionalData}) → Uint8List - Encrypts a message with optional additional data, a key and a nonce.
-
encryptDetached(
Uint8List value, Uint8List nonce, Uint8List key, {Uint8List? additionalData}) → DetachedCipher - Encrypts a message with optional additional data, a key and a nonce. Returns a detached cipher text and mac.
-
encryptString(
String value, Uint8List nonce, Uint8List key, {String? additionalData}) → Uint8List - Encrypts a string message with optional additional data, a key and a nonce.
-
encryptStringDetached(
String value, Uint8List nonce, Uint8List key, {String? additionalData}) → DetachedCipher - Encrypts a string message with optional additional data, a key and a nonce. Returns a detached cipher text and mac.
-
randomKey(
) → Uint8List - Generates a random key for use with the ChaCha20-Poly1305 construction.
-
randomNonce(
) → Uint8List - Generates a random nonce for use with the ChaCha20-Poly1305 construction.