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.212 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.211 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.210 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.209 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js
smock-0.1.208 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/test/pbkdf2.js