This commit is contained in:
commit
3e78333d70
1 changed files with 4 additions and 2 deletions
|
@ -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 = ''
|
||||
|
|
Loading…
Reference in a new issue