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
-
- Object
- AEADCipher<
XChaCha20, Poly1305> - AEADStreamCipher<
XChaCha20, Poly1305> - XChaCha20Poly1305
- 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< stream) → Stream<int> >Uint8List> -
Transform the
streamof 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
messageof 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
messagewith an authentication tag.override -
signStream(
Stream< List< stream, [List<int> >int> ? aad]) → AEADStreamResult -
Generates a message authentication tag for a
streamof data.override -
stream(
Stream< int> stream, [int chunkSize = 1024]) → Stream<int> -
Available on StreamCipher, provided by the StreamCipherExtension extension
Transforms thestreamof 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
messagecan be verified by the given message authentication codemac.inherited -
verifyStream(
Stream< List< stream, List<int> >int> mac, [List<int> ? aad]) → Future<bool> -
Returns true if input
streamcan be verified by the given message authentication tagmac.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited