0.1.1 • Published 5 years ago

bcrypt-hashpass v0.1.1

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

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');
0.1.1

5 years ago

0.1.0

5 years ago