tibi-docs/docs/md/server-javascript-kontext/packages/bcrypt.md
2023-06-03 18:07:58 +00:00

27 lines
511 B
Markdown

## bcrypt
```ts
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
}
```