bcrypt-hashpass
v0.1.1
Published
hash pass with bcrypt
Downloads
4
Readme
bcrypt-hashpass
Simple password hashing and comparing functions.
Usage
ENV
process.env.SALT_ROUNDS: number # 1, 2, 3, any number
rocess.env.PASS_SALT: string # generated salt. This can be ignore for automaticaly generated.
hash pass
import { hashPass, comparePassword } from 'bcrypt-hashpass';
const hashed = hashPass('mysecurepass');
compare password
import { hashPass, comparePassword } from 'bcrypt-hashpass';
const correct = comparePassword('mysecurepass', 'HashedPasswordXXX');