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
gulp_assets-1.0.0.pre.5 template/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
gulp_assets-1.0.0.pre.4 template/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
gulp_assets-1.0.0.pre.3 template/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.268 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.267 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.266 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.265 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.264 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.263 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.262 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.261 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.260 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.259 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.258 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.256 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.255 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.254 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.253 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.252 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.251 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js