Sha256: 00ca7f40256a9fd65512c2ca0b91c5ebf41b5aedb125cd8c01528aff3566abac

Contents?: true

Size: 498 Bytes

Versions: 65

Compression:

Stored size: 498 Bytes

Contents

var tape = require('tape')
var pbkdf2Sync = require('../').pbkdf2Sync

var vectors = require('hash-test-vectors/pbkdf2')

tape('pbkdf2', function (t) {
  vectors.forEach(function (input) {
    //skip inputs that will take way too long
    if(input.iterations > 10000) return

    var key = pbkdf2Sync(input.password, input.salt, input.iterations, input.length)

    if(key.toString('hex') !== input.sha1)
      console.log(input)

    t.equal(key.toString('hex'), input.sha1)


  })

  t.end()
})

Version data entries

65 entries across 65 versions & 2 rubygems

Version Path
smock-0.1.250 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.249 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.247 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.246 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.245 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.244 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.243 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.242 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.241 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.240 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.239 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.2 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.1 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.238 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.237 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.236 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.235 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.234 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.233 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.232 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js