Module: Password

Manages password hashing
Source:

Methods

(inner) generateCode() → {string}

Generates a random activation code
Source:
Returns:
Type
string

(inner) generateHash(password, salt, iterations) → {Buffer}

Generates an hash for a password
Parameters:
Name Type Description
password string
salt Buffer
iterations int
Source:
Returns:
Type
Buffer

(inner) generatePassword() → {string}

Source:
Returns:
Type
string

(inner) generateRandomBytes(len) → {Buffer}

Generates an array of random bytes of the specified size
Parameters:
Name Type Description
len int
Source:
Returns:
Type
Buffer

(inner) generateSalt() → {Buffer}

Source:
Returns:
Type
Buffer

(async, inner) verify(password, salt, secureHash, iterations) → {boolean}

Verifies the hash for a password
Parameters:
Name Type Description
password string
salt Buffer
secureHash Buffer
iterations int
Source:
Returns:
Type
boolean