password-hasher-bgc

1.0.0 • Public • Published

password-hasher-bgc

A simple typescript library used for password generation and verification

Instalation

yarn add password-hasher-bgc
npm install password-hasher-bgc

Usage

  import {validatePAssword, hashedPassword} from "password-hasher-bgc"

  const {hash,salt} = hashPasword("yourpasword)

  const isValid = validatePasword("yourpassword, salt,hash)

Functions

validatePassword(inpitPassword, salt, storeHashed)boolean

Given an input password a salt and an hash Does the given password match with the hash

hashPassword(password)HaskedSalt

Given a password, hash it with a solt , then return the hash and the salt

validatePassword(inpitPassword, salt, storeHashed) ⇒ boolean

Given an input password a salt and an hash Does the given password match with the hash

Kind: global function Returns: boolean - does hash(inputPassword + ssalt) === storedHash?

Param Type
inpitPassword string
salt string
storeHashed string

hashPassword(password) ⇒ HaskedSalt

Given a password, hash it with a solt , then return the hash and the salt

Kind: global function Returns: HaskedSalt - object containing the hash ant the salt

Param Type
password string

Readme

Keywords

none

Package Sidebar

Install

npm i password-hasher-bgc

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

1.04 MB

Total Files

42

Last publish

Collaborators

  • belegic