0.3.3 • Published 10 years ago
fastpbkdf2 v0.3.3
Nodejs binding of https://github.com/ctz/fastpbkdf2 - CC0 License
Install
npm install fastpbkdf2 --saveUsage - 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-gypif you don't have node-gyp installed.npm install fastpbkdf2will 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 sampleornode testto run tests
License
MIT