Skip to content
A mini node module to hash password with random string salt.
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples
test
.gitignore
LICENSE
README.md
index.js
package.json

README.md

node-safepass

  • A mini Node.js module to hash password with random string salt.

Usage

safepass.hash(password, [length]) default length is 8; safepass.isValid(password, hashstring);

var safepass = require("safepass");

// hash password
var hash = safepass.hash(password);
var hash = safepass.hash(password, 10);

// check password
safepass.isValid(password, hash); // return boolean

// or use chain way
safepass.set(hash).isValid(password); // return boolean
Something went wrong with that request. Please try again.