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.
Parameters
Name | Type |
---|---|
password | string |
Returns
Promise
<string
>
Defined in
isPasswordMatch
▸ isPasswordMatch(candidatePassword
, knownPasswordHash
): Promise
<boolean
>
Validate a given password.
Uses a "constant-time" algorithm to counter timing attacks.
Parameters
Name | Type |
---|---|
candidatePassword | string |
knownPasswordHash | string |
Returns
Promise
<boolean
>