Interface for computing MAC (Message Authentication Code) values, e.g. HMAC with various underlying hash algorithms.
Supported MAC algorithms include (but are not limited to):
- HMAC-SHA-256
- HMAC-SHA-512
- HMAC-SHA-1
A MAC is a fixed-size byte tag derived from a secret key and input data, providing both data integrity and origin authentication.
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
-
generate(
Uint8List key, Uint8List data) → Uint8List -
Generate MAC tag from secret
keyand inputdata. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
verify(
Uint8List key, Uint8List data, Uint8List tag) → bool - Constant-time verify MAC tag.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited