XChaCha20Poly1305 class

XChaCha20-Poly1305 is a cryptographic algorithm combining XChaCha20 stream cipher for encryption and Poly1305 for generating message authentication code.

This class can not be instantiated directly, instead use this method:

final algo = XChaCha20(key, nonce, counter).poly1305(aad);

This implementation is based on the RFC-8439

Inheritance
Mixed-in types
Available extensions

Properties

algo Poly1305
The MAC generator used by this AEAD construction
finalinherited
cipher XChaCha20
The cipher used by this AEAD construction
finalinherited
hashCode int
The hash code for this object.
no setterinherited
iv Uint8List
The salt or initialization vector
no setteroverride
name String
The name of the algorithm
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

$mac(List<int> data, [List<int>? aad]) HashDigest
Generates a message authentication code for the data.
inherited
bind(Stream<List<int>> stream) Stream<Uint8List>
Transform the stream of chunks of message bytes using the algorithm.
inherited
cast<RS, RT>() StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer.
inherited
convert(List<int> message) Uint8List
Transforms the message of bytes using the cipher algorithm without generating a message authentication code.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetIV() → void
Replaces current IV with a new random one
override
sign(List<int> message, [List<int>? aad]) AEADResultWithIV
Signs the message with an authentication tag.
override
signStream(Stream<List<int>> stream, [List<int>? aad]) AEADStreamResult
Generates a message authentication tag for a stream of data.
override
stream(Stream<int> stream, [int chunkSize = 1024]) Stream<int>

Available on StreamCipher, provided by the StreamCipherExtension extension

Transforms the stream of message bytes using the algorithm.
toString() String
A string representation of this object.
inherited
verify(List<int> message, List<int> mac, [List<int>? aad]) bool
Returns true if input message can be verified by the given message authentication code mac.
inherited
verifyStream(Stream<List<int>> stream, List<int> mac, [List<int>? aad]) Future<bool>
Returns true if input stream can be verified by the given message authentication tag mac.
inherited

Operators

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