Skip to content

my-archives/pbkdf2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pbkdf2 Build Status

NOTE: Password_hash and salt is a hex string.

Information

Package
Description Hash password and compare with PBKDF2, use sha1, sha256, sha512, etc.
Node Version >= 0.11.11

Install

npm install pbkdf2

Usage

var pbkdf2 = require('pbkdf2');
var p = 'password';
var s = pbkdf2.generateSaltSync(32);
var pwd = pbkdf2.hashSync(p, s, 1, 20, 'sha256');
var bool = pbkdf2.compareSync(pwd, p, s, 1, 20, 'sha256');

API

  • hash(password, salt, iterations, keylen, algorithm, callback(error, password_hash))
  • hashSync(password, salt, iterations, keylen, algorithm), return password_hash
  • generateSalt(callback(error, salt), saltlen)
  • generateSaltSync(saltlen), return salt
  • compare(password_hash, password, salt, iterations, keylen, algorithm, callback(error, bool))
  • compareSync(password_hash, password, salt, iterations, keylen, algorithm), return bool

Bitdeli Badge

About

[DEPRECATED] Hash password and compare with PBKDF2, use sha1, sha256, sha512. Moved to https://github.com/crypto-browserify/pbkdf2

Resources

License

Stars

Watchers

Forks

Packages

No packages published