mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 10:45:51 +03:00
actually clear bit 63 instead of bit 55
This commit is contained in:
parent
d5e1836e86
commit
443a15eeb9
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ export async function encryptMegolmKeyFile(data, password, options) {
|
|||
// clear bit 63 of the IV to stop us hitting the 64-bit counter boundary
|
||||
// (which would mean we wouldn't be able to decrypt on Android). The loss
|
||||
// of a single bit of iv is a price we have to pay.
|
||||
iv[9] &= 0x7f;
|
||||
iv[8] &= 0x7f;
|
||||
|
||||
const [aesKey, hmacKey] = await deriveKeys(salt, kdfRounds, password);
|
||||
const encodedData = new TextEncoder().encode(data);
|
||||
|
|
Loading…
Reference in a new issue