16 lines
407 B
TypeScript
16 lines
407 B
TypeScript
|
/**
|
||
|
* create an argon2 hash
|
||
|
*
|
||
|
* @param {string} plain plain text
|
||
|
* @returns {Promise<string>} hash
|
||
|
*/
|
||
|
export function hash(plain: string): Promise<string>;
|
||
|
/**
|
||
|
* verify a plain text against an argon2 hash
|
||
|
*
|
||
|
* @param {string} hash_str hash
|
||
|
* @param {string} plain plain text
|
||
|
* @returns {Promise<boolean>} true if valid
|
||
|
*/
|
||
|
export function verify(hash_str: string, plain: string): Promise<boolean>;
|