Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: chrome/test/data/third_party/kraken/tests/kraken-1.1/stanford-crypto-pbkdf2.js

Issue 11348021: Automate Kraken benchmark with Chrome Remote Control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /* From http://www.cryptosys.net/manapi/api_PBE_Kdf2.html */
2
3 new sjcl.test.TestCase("PBKDF2", function (cb) {
4 if (!sjcl.misc.pbkdf2 || !sjcl.misc.hmac || !sjcl.hash.sha256) {
5 this.unimplemented();
6 cb && cb();
7 return;
8 }
9
10 //XXX use 8 inputs, not 8 iterations
11 for (var index = 0; index < 8; index++) {
12 var h = sjcl.codec.hex, password = "password", salt = "78 57 8E 5A 5D 63 C B 06", count = 2048, output,
13 goodOutput = "97b5a91d35af542324881315c4f849e327c4707d1bc9d322";
14 output = sjcl.misc.pbkdf2(password, h.toBits(salt), count);
15 output = h.fromBits(output);
16 this.require(output.substr(0,goodOutput.length) == goodOutput);
17 cb && cb();
18 }
19 });
20 sjcl.test.run();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698