A simple package to hash and verify passwords
-
validatePassword(inputPassword, salt, storedHash) ⇒
boolean
-
Given an input password a salt and hash Does the given password match with the hash?
-
hashPassword(password) ⇒
HashAndSalt
-
Given a passwor, hash it with a salt, then return the hash and the salt
-
HashAndSalt :
Object
Given an input password a salt and hash Does the given password match with the hash?
Kind: global function
Param | Type |
---|---|
inputPassword | string |
salt | sting |
storedHash | string |
hashPassword(password) ⇒ HashAndSalt
Given a passwor, hash it with a salt, then return the hash and the salt
Kind: global function
Param | Type |
---|---|
password | string |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
hash | string |
The hash we got |
salt | string |
The salt used for hashing |