mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
aes-js doesn't work with ArrayBuffers
This commit is contained in:
parent
36b56132b0
commit
9fd39ab57f
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user