fastpbkdf2
v0.3.3
Published
Nodejs port of fastpbkdf2
Downloads
6
Maintainers
Readme
Nodejs binding of https://github.com/ctz/fastpbkdf2 - CC0 License
Install
npm install fastpbkdf2 --save
Usage - similar to crypto.pbkdf2Sync
var fastpbkdf2 = require('fastpbkdf2');
var crypto = require('crypto');
var password = "password", salt = new Buffer("salt"), iterations = 10000, keylen = 64;
var hash1 = crypto.pbkdf2Sync(password, salt, iterations, keylen);
var hash2 = fastpbkdf2.sha1(password, salt, iterations, keylen);
Interface
fastpbkdf2.sha1(password, salt, iterations, keylen);
fastpbkdf2.sha256(password, salt, iterations, keylen);
fastpbkdf2.sha512(password, salt, iterations, keylen);
###Build
sudo npm install -g node-gyp
if you don't have node-gyp installed.npm install fastpbkdf2
will automatically build using node-gyp or clone this repo and usenode-gyp rebuild
.- Build tested with nodejs 4.2.1 on OSX and Ubuntu/Debian
node sample
ornode test
to run tests
License
MIT