511 B
511 B
bcrypt
interface BcryptPackage {
/**
* hash password via bcrypt algo
*
* @param password clear text password
* @param options hashing options
*/
hash(
password: string,
options?: {
cost?: number
}
): string
/**
* check password against hashed password via bcrypt algo
*
* @param password clear text password
* @param hash hashed password
*/
check(password: string, hash: string): boolean
}