This commit is contained in:
Keith Morrow 2015-06-06 15:22:49 -04:00
commit 3e78333d70

View file

@ -24,7 +24,7 @@ function encrypt(file, seed, id) {
var uarr = new Uint8Array(file)
var before = sjcl.codec.bytes.toBits(uarr)
var prp = new sjcl.cipher.aes(params.key)
var after = sjcl.arrayBuffer.ccm.compat_encrypt(prp, before, params.iv)
var after = sjcl.mode.ccm.encrypt(prp, before, params.iv)
var afterarray = new Uint8Array(sjcl.codec.bytes.fromBits(after))
postMessage({
'id': id,
@ -39,7 +39,9 @@ function decrypt(file, seed, id) {
var uarr = new Uint8Array(file)
var before = sjcl.codec.bytes.toBits(uarr);
var prp = new sjcl.cipher.aes(params.key);
var after = sjcl.arrayBuffer.ccm.compat_decrypt(prp, before, params.iv);
var after = sjcl.mode.ccm.decrypt(prp, before, params.iv);
var afterarray = new Uint8Array(sjcl.codec.bytes.fromBits(after));
var header = ''