verifyHashString method
Future<bool>
verifyHashString(
- String password,
- String encodedHash, {
- Argon2Type type = Argon2Type.i,
The Future method to handle verifying a String argon2 hash against a String password
Needs a UTF-8 String password
, a UTF-8 String encodedHash
, as well as an
Argon2Type type
used for the actual hash. This method gets the byte arrays of
both Strings and calls verifyHashBytes with that info.
Returns a Future with the bool of whether the hashing was a match or not
Implementation
Future<bool> verifyHashString(String password, String encodedHash,
{Argon2Type type = Argon2Type.i}) =>
verifyHashBytes(utf8.encode(password), utf8.encode(encodedHash),
type: type);