Scrypt using MCF for both browsers and Node.js
▸ hash(password
, options?
): Promise
<string
>
Computes a MFC string derived using scrypt on input password
Name | Type | Description |
---|---|---|
password |
string |
the password |
options? |
ScryptMcfOptions |
optional 16 bytes/22 characters salt in base64 with no padding (a fresh random one is created if not provided), derivedKeyLength (defaults to 32 bytes), and scrypt parameters (defaults to { logN: 17, r: 8, p: 1 }) |
Promise
<string
>
a MFC string with the format $scrypt$ln=,r=,p=$$
▸ verify(password
, mcf
): Promise
<boolean
>
Verify if provided password meets the stored hash (in MCF)
Name | Type | Description |
---|---|---|
password |
string |
the password to test |
mcf |
string |
a MFC string with the format $scrypt$ln=,r=,p=$$ |
Promise
<boolean
>