Class

PasswordUtils

PasswordUtils()

Utility functions for password operations.

Constructor

# new PasswordUtils()

View Source utils/password.utils.js, line 7

Methods

# async static comparePassword(password, hashedPassword) → {Promise.<boolean>}

Compare a plain text password with a hashed password.

Parameters:
Name Type Description
password string

Plain text password.

hashedPassword string

Hashed password to compare against.

View Source utils/password.utils.js, line 22

True if passwords match.

Promise.<boolean>

# async static hashPassword(password) → {Promise.<string>}

Hash a plain text password.

Parameters:
Name Type Description
password string

Plain text password.

View Source utils/password.utils.js, line 13

Hashed password.

Promise.<string>

# static validatePasswordStrength(password) → {boolean}

Validate password strength (optional utility).

Parameters:
Name Type Description
password string

Password to validate.

View Source utils/password.utils.js, line 30

True if password meets requirements.

boolean