Explorar o código

turning off random iv works

Mike Hamburg %!s(int64=14) %!d(string=hai) anos
pai
achega
4abe395d16
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      demo/example.js

+ 1 - 1
demo/example.js

@@ -64,7 +64,7 @@ function doEncrypt() {
         mode:v.mode,
         ts:parseInt(v.tag),
         ks:parseInt(v.keysize) };
-  if (!v.freshiv || !usedIvs[v.iv]) { iv:v.iv; }
+  if (!v.freshiv || !usedIvs[v.iv]) { p.iv = v.iv; }
   if (!v.freshsalt || !usedSalts[v.salt]) { p.salt = v.salt; }
   ct = sjcl.encrypt(password || key, plaintext, p, rp).replace(/,/g,",\n");