hashHandler
function hashHandler(password: string)
async
Hashes a password using bcrypt.
Returns: Promise<string>
- The hashed password.
See the official bcrypt package documentation for more details:
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
password | string | The plaintext password to hash. |
See:
const hashedPassword = await hashHandler("mySecurePassword");
console.log(hashedPassword);