Home Reference Source
public class | source

PBKDF2

Extends:

Crypt → PBKDF2

Use crypto.pbkdf2

implementation adapted from https://gist.github.com/skeggse/52672ddee97c8efec269

Constructor Summary

Public Constructor
public

constructor(options: Object)

Member Summary

Public Members
public
public
public
public

Method Summary

Public Methods
public

hashImplementation(password: *): *

public

verifyImplementation(password: *, oldhash: *): *

Inherited Summary

From class Crypt
public

async hash(password: string): string

Hash a password.

public abstract

async hashImplementation(password_: string): string

Implementation of hash() minus checks.

public

async verify(password: String, hash: String): boolean

Verify a password against previously hashed password

public

async verifyImplementation(password: String, hash: String): boolean

Implementation of verify() minus checks.

Public Constructors

Public Members

public hashBytes: * source

public hashDigest: * source

public iterations: * source

public saltBytes: * source

Public Methods

public hashImplementation(password: *): * source

Implementation of hash() minus checks.

Override:

Crypt#hashImplementation

Params:

NameTypeAttributeDescription
password *

Return:

*

public verifyImplementation(password: *, oldhash: *): * source

Implementation of verify() minus checks.

Default implementation hashes new password and does string compare. This'll work for weaker hashes like md5 but won't work for stronger ones like scrypt.

Override:

Crypt#verifyImplementation

Params:

NameTypeAttributeDescription
password *
oldhash *

Return:

*