import PBKDF2 from 'node-user-accounts-boilerplate/node-user-accounts-boilerplate-nahid/crypt/PBKDF2.js'
PBKDF2
Extends:
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 |
hashBytes: * |
|
public |
hashDigest: * |
|
public |
iterations: * |
|
public |
saltBytes: * |
Method Summary
Public Methods | ||
public |
hashImplementation(password: *): * |
|
public |
verifyImplementation(password: *, oldhash: *): * |
Inherited Summary
From class Crypt | ||
public |
Hash a password. |
|
public abstract |
async hashImplementation(password_: string): string Implementation of hash() minus checks. |
|
public |
Verify a password against previously hashed password |
|
public |
async verifyImplementation(password: String, hash: String): boolean Implementation of verify() minus checks. |
Public Constructors
public constructor(options: Object) source
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#hashImplementationParams:
Name | Type | Attribute | Description |
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#verifyImplementationParams:
Name | Type | Attribute | Description |
password | * | ||
oldhash | * |
Return:
* |