packages start...
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
## 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
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user