simple-password

1.0.1 • Public • Published

Build Status

Password

Simple password hashing and verification.

Installation

`npm install simple-password

Usage

To create a password:

var password = require('simple-password');

password.create('batman', 10).then(hash => {
	// hash is a salted hash of 'batman'.
});

To verify a password:

var password = require('simple-password');

// hashed string of 'batman'.
var hashed = '$2a$10$7gE7dtP5u5Cs65QOKZ6WveKHF.UdX2of4J90987mBur8uHdReOgvy';

password.verify('batman', hashed).then(verified => {
	// verify is true|false.
});

Tests

Run npm test.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0

Package Sidebar

Install

npm i simple-password

Weekly Downloads

0

Version

1.0.1

License

ISC

Last publish

Collaborators

  • prismatik