Skip to content

Latest commit

 

History

History
63 lines (36 loc) · 1.62 KB

API.md

File metadata and controls

63 lines (36 loc) · 1.62 KB

scrypt-mcf - v1.1.1

Scrypt using MCF for both browsers and Node.js

Table of contents

Interfaces

Functions

Functions

hash

hash(password, options?): Promise<string>

Computes a MFC string derived using scrypt on input password

Parameters

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 })

Returns

Promise<string>

a MFC string with the format $scrypt$ln=,r=,p=$$

Defined in

index.ts:28


verify

verify(password, mcf): Promise<boolean>

Verify if provided password meets the stored hash (in MCF)

Parameters

Name Type Description
password string the password to test
mcf string a MFC string with the format $scrypt$ln=,r=,p=$$

Returns

Promise<boolean>

Defined in

index.ts:53