Browse Source

Pass first KDF test

Rob Napier 10 years ago
parent
commit
6f42f92812
3 changed files with 3 additions and 3 deletions
  1. 1 1
      Spec
  2. 1 1
      rncryptor.js
  3. 1 1
      tests/rncryptor-test.js

+ 1 - 1
Spec

@@ -1 +1 @@
-Subproject commit f7527b3fd8ae5ab45c56e0ef46d0dec60c136ce0
+Subproject commit 2726a52e8125ab80de81c417cb3f1d5d01503f5d

+ 1 - 1
rncryptor.js

@@ -4,5 +4,5 @@ var RNCryptor = {};
     Takes password string and salt WordArray
 */
 RNCryptor.KeyForPassword = function(password, salt) {
-    return CryptoJS.PBKDF2(password, salt, { keySize: 256/32, iterations: 10000 });
+    return CryptoJS.PBKDF2(password, salt, { keySize: 256/32, iterations: 1000 });
 }

+ 1 - 1
tests/rncryptor-test.js

@@ -1,5 +1,5 @@
 test("KDF: One byte", function() {
   var key = RNCryptor.KeyForPassword("a", CryptoJS.enc.Hex.parse("0102030405060708"));
-  equal(key.toString(), "fc632b0c a6b23eff 9a9dc3e0 e585167f 5a328916 ed19f835 58be3ba9 828797cd".replace(/\s/g,''));
+  equal(key.toString(), "d48f10b7 ae39bd25 2bb68e1f af12acea 3474d7d7 702a15b2 ede3246e 82dbb2fd".replace(/\s/g,''));
 });