verifyHashStringSync method
bool
verifyHashStringSync(
- String password,
- String encodedHash, {
- Argon2Type type = Argon2Type.i,
The method to verify a String password and a String encodedHash.
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 bool with a true for a success and false for a failed verification.
Implementation
bool verifyHashStringSync(String password, String encodedHash,
{Argon2Type type = Argon2Type.i}) {
return verifyHashBytesSync(utf8.encode(password), utf8.encode(encodedHash),
type: type);
}