Salted password hashing with PBKDF2. (Adapted from http://crackstation.net/hashing-security.htm)
Last updated 5 years ago by florencehealthcare .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @florencehealthcare/passwordhash 
SYNC missed versions from official npm registry.

Password Hash

A node.js module to hash passwords based on this article: https://crackstation.net/hashing-security.htm

This produces a password in the following format:

<hashing algorithm>:<number of iterations>:<hashed password>:<unique seed>

For example, the following is a hash for the password Florence123:



The article describes the algorithm to produce a secure hash for a password. Some of the main benefits is that each entry contains its own secure seed, so every record in the database should have a different seed for every password.


npm install @agarcian/passwordhash


var passwordhash = require('@agarcian/passwordhash');

var pwd  = 'my password';
var hash = passwordhash.createHash(pwd, function(err, hash) {
    passwordhash.validatePassword(pwd, hash, function(err, success) {
        console.log('The password hash was validated successfully:' + success ? 'yes' : 'no');

Output should be yes


npm test

Current Tags

  • 1.0.2                                ...           latest (5 years ago)

1 Versions

  • 1.0.2                                ...           5 years ago
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (2)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |