forked from mystiq/hydrogen-web
aes-js doesn't work with ArrayBuffers
This commit is contained in:
parent
36b56132b0
commit
9fd39ab57f
1 changed files with 2 additions and 2 deletions
|
@ -209,8 +209,8 @@ class CryptoLegacyAESDriver {
|
|||
*/
|
||||
async decrypt(key, iv, ciphertext) {
|
||||
const aesjs = this._aesjs;
|
||||
var aesCtr = new aesjs.ModeOfOperation.ctr(key, new aesjs.Counter(iv));
|
||||
return aesCtr.decrypt(ciphertext);
|
||||
var aesCtr = new aesjs.ModeOfOperation.ctr(new Uint8Array(key), new aesjs.Counter(new Uint8Array(iv)));
|
||||
return aesCtr.decrypt(new Uint8Array(ciphertext));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue