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) {
|
async decrypt(key, iv, ciphertext) {
|
||||||
const aesjs = this._aesjs;
|
const aesjs = this._aesjs;
|
||||||
var aesCtr = new aesjs.ModeOfOperation.ctr(key, new aesjs.Counter(iv));
|
var aesCtr = new aesjs.ModeOfOperation.ctr(new Uint8Array(key), new aesjs.Counter(new Uint8Array(iv)));
|
||||||
return aesCtr.decrypt(ciphertext);
|
return aesCtr.decrypt(new Uint8Array(ciphertext));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue