UNPKG

pbkdf2-compat

Version:

This library provides the functionality of PBKDF2 with the ability to use any supported hashing algorithm returned from crypto.getHashes()

8 lines (5 loc) 240 B
var compat = require('./browser') process.on('message', function (m) { var result = compat.pbkdf2Sync(new Buffer(m.password, 'hex'), new Buffer(m.salt, 'hex'), m.iterations, m.keylen, m.digest) process.send(result.toString('hex')) })