The password to hash.
Optional
options: Partial<PasswordHashOptions>The options to use when generating the password hash. Please refer to constants for default values.
A promise that resolves to a PasswordHashType object.
const passwordHash = await generatePasswordHash('password'); // default options used
Generates a password hash that can be stored in the database. Each password hash is generated with a random salt.