Poly1305 class abstract
Poly1305 (RFC 7539) MacAlgorithm.
If you want ChaCha20 with Poly1305 MAC, you should use
ChaCha20.poly1305Aead
constructor.
Things to know
- Produces a 128 bit authentication code.
- DO NOT use the same (key, nonce) tuple twice.
- DO NOT use the algorithm for key derivation.
- Poly1305 and Poly1305-AEAD (DartChacha20Poly1305AeadMacAlgorithm) are NOT the same.
- Inheritance
-
- Object
- MacAlgorithm
- Poly1305
- Implementers
Constructors
- Poly1305()
-
factory
- Poly1305.constructor()
-
Constructor for subclasses.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- keyStreamUsed → int
-
Number of bytes in key stream used to initialize the MAC algorithm.
no setterinherited
- macLength → int
-
Number of bytes in the message authentication code.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supportsAad → bool
-
Whether the algorithm supports Associated Authenticated Data (AAD).
no setterinherited
- supportsKeyStreamIndex → bool
-
Whether the algorithm supports key stream index.
no setterinherited
Methods
-
calculateMac(
List< int> bytes, {required SecretKey secretKey, List<int> nonce = const <int>[], List<int> aad = const <int>[]}) → Future<Mac> -
Calculates message authentication code.
inherited
-
checkParameters(
{int? length, required SecretKey secretKey, required int nonceLength, required int aadLength, required int keyStreamIndex}) → void -
Checks parameters and throws ArgumentError if they are invalid.
inherited
-
newMacSink(
{required SecretKey secretKey, List< int> nonce = const <int>[], List<int> aad = const <int>[]}) → Future<MacSink> -
Constructs a sink for calculating a Mac.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toSync(
) → DartPoly1305 -
Returns a synchronous implementation of this algorithm.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override