bcrypt-hashpass
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i bcrypt-hashpass

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

3.13 kB

Total Files

9

Last publish

Collaborators

  • lucduong