MacCrypt class
Class containing hashing for Message Authentication Codes.
This version of MacCrypt is encoded, meaning that it expects keys and IVs to be base64, and returns base64 encoded Strings. Plaintext should be UTF-8 valid. For more flexibility, MacCryptRaw is recommended.
Constructors
- MacCrypt({required String key, required MacType type, HmacHash? algorithm})
- MacCrypt.CMAC({required String key})
- MacCrypt.HMAC({required String key, required HmacHash algo})
- MacCrypt.Poly1305({required String key})
Properties
Methods
-
check(
{required String plain, required String hashed, String? iv}) → bool - Check if plaintext matches previously hashed text
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
process(
{required String inp, String? iv}) → String - Process and hash string.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited