service/password
Api Code Documentation / Exports / service/password
#
Table of contents#
Type aliases#
Functions#
Type aliases#
DigestƬ Digest: string
#
Defined in#
InputƬ Input: string
#
Defined in#
Functions#
hashPasswordâ–¸ hashPassword(password
): Promise
<string
>
Create a password hash.
#
ParametersName | Type |
---|---|
password | string |
#
ReturnsPromise
<string
>
#
Defined in#
isPasswordMatchâ–¸ isPasswordMatch(candidatePassword
, knownPasswordHash
): Promise
<boolean
>
Validate a given password.
Uses a "constant-time" algorithm to counter timing attacks.
#
ParametersName | Type |
---|---|
candidatePassword | string |
knownPasswordHash | string |
#
ReturnsPromise
<boolean
>