Install
pass-hasher installation is possible from npm
npm install pass-hasher --save --save-exat
Introduction
The pass-hasher is a little and simple package which used the bcrypt package for create salt and hashing the password.
The pass-hasher in another side add the random generated pepper on user password for to be more secured.
How to use
pass-hasher is have three simple methods.
const passHasher = require('pass-hasher')
let securityStuff = passHasher.generateKeys('username', 'password')
let salt = 'some salt from password db'
let hash = passHasher.checkPassword('username', 'password', salt)
let hash = 'some hash from password db'
let isAuthenticated = passHasher.checkPassword('username', 'password', salt, hash)