Mobile: Fixes #16589: Upgrade React Native to v0.86, Expo to v57 (#16636)

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
Henry HeinoandLaurent Cozic authored and GitHub committed 2026-10-06 15:37:33 +01:00
1 parent 9f84bda5db
commit 9e4ca948be
36 files changed
+3093 -1821

No files matched your search

@@ -235,6 +235,33 @@ export async function testFilePerformance(method: EncryptionMethod, dataSize: nu
}
}
const checkRandomBytes = async () => {
const length = 100;
const randomBytes = await shim.randomBytes(length);
const errorPrefix = `shim.randomBytes(${length}) test failed`;
if (randomBytes.length !== length) {
throw new Error(`${errorPrefix}: unexpected length ${randomBytes.length}`);
}
let sum = 0;
for (const b of randomBytes) {
sum += b;
if (!Number.isInteger(b)) {
throw new Error(`${errorPrefix}: Generated byte is not an integer: ${b}`);
}
if (b < 0 || b > 255) {
throw new Error(`${errorPrefix}: Byte out of range: ${b}`);
}
}
// It's extremely unlikely that all 100 bytes will all be zero by chance:
if (sum === 0) {
throw new Error('randomBytes test failed: Did not generate a non-zero byte.');
}
};
// cSpell:disable
// Data generated on desktop, using node:crypto in packages/lib/services/e2ee/crypto.ts
@@ -278,6 +305,9 @@ export const runIntegrationTests = async (silent = false, testPerformance = fals
log('Testing bufferToString...');
checkBufferToString();
log('Testing shim.randomBytes...');
await checkRandomBytes();
log('Decrypting using known data...');
for (const testLabel in decryptTestData) {
log(`Running decrypt test data case ${testLabel}...`);