import Crypt from 'node-user-accounts-boilerplate/node-user-accounts-boilerplate-nahid/crypt/Crypt.js'
Crypt
Abstract class for taking care of password hashing and verification.
Method Summary
Public Methods | ||
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 Methods
public async hash(password: string): string source
Hash a password.
Params:
Name | Type | Attribute | Description |
password | string | Password to hash |
public abstract async hashImplementation(password_: string): string source
Implementation of hash() minus checks.
Params:
Name | Type | Attribute | Description |
password_ | string | Password to hash |
public async verify(password: String, hash: String): boolean source
Verify a password against previously hashed password