verifyPassword static method
Verifies a plain-text password against a stored hash.
Parameters:
key: The plain-text password to verify.hash: The stored password hash.
Returns true when the password matches the hash; otherwise false.
Example:
final hash = Auth.hashPassword(key: 'super-secret-password');
final matches = Auth.verifyPassword(
key: 'super-secret-password',
hash: hash,
);
print(matches); // true
Implementation
static bool verifyPassword({required String key, String? hash}) {
return Hasher.check(key: key, hash: hash);
}