Backups: update integration tests

This commit is contained in:
trevor-signal
2025-06-30 17:54:21 -04:00
committed by GitHub
parent 0771075a75
commit 746b22d3dc
6 changed files with 127 additions and 31 deletions

View File

@@ -37,7 +37,7 @@ export function isValidAttachmentKey(
return false;
}
const bytes = fromBase64(keyBase64);
return bytes.byteLength > 0;
return bytes.byteLength === KEY_SET_LENGTH;
}
export function isValidDigest(
@@ -47,7 +47,7 @@ export function isValidDigest(
return false;
}
const bytes = fromBase64(digestBase64);
return bytes.byteLength > 0;
return bytes.byteLength === DIGEST_LENGTH;
}
export function isValidPlaintextHash(
@@ -57,5 +57,5 @@ export function isValidPlaintextHash(
return false;
}
const bytes = fromHex(plaintextHashHex);
return bytes.byteLength > 0;
return bytes.byteLength === PLAINTEXT_HASH_LENGTH;
}