Files
rspade_system/node_modules/crypto-browserify/test/pbkdf2.js
root f6fac6c4bc Fix bin/publish: copy docs.dist from project root
Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 02:08:33 +00:00

24 lines
520 B
JavaScript
Executable File

'use strict';
var tape = require('tape');
var crypto = require('pbkdf2/browser');
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 = crypto.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();
});