You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
lint
This commit is contained in:
@@ -684,13 +684,6 @@ export class Curve25519 implements BackupAlgorithm {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: this should go into ./aes
|
||||
interface AesData {
|
||||
iv: string,
|
||||
ciphertext: string,
|
||||
mac: string,
|
||||
}
|
||||
|
||||
function randomBytes(size: number): Uint8Array {
|
||||
const crypto: {randomBytes: (number) => Uint8Array} | undefined = getCrypto() as any;
|
||||
if (crypto) {
|
||||
@@ -721,7 +714,7 @@ export class Aes256 implements BackupAlgorithm {
|
||||
if (!authData) {
|
||||
throw new Error("auth_data missing");
|
||||
}
|
||||
const key = await getKey()
|
||||
const key = await getKey();
|
||||
if (authData.mac) {
|
||||
const { mac } = await calculateKeyCheck(key, authData.iv);
|
||||
if (authData.mac.replace(/=+$/g, '') !== mac.replace(/=+/g, '')) {
|
||||
|
||||
Reference in New Issue
Block a user