hashPassword static method

String hashPassword({
  1. required String key,
})

Hashes a plain-text password for secure storage.

Parameters:

  • key: The plain-text password to hash.

Returns the generated password hash.

Example:

final hash = Auth.hashPassword(key: 'super-secret-password');
print(hash);

Implementation

static String hashPassword({required String key}) {
  return Hasher.make(key: key);
}