HomePhabricator
Diffusion Comm 566e961470fe

[native] Fix error propagation in AESCryptoModule

Description

[native] Fix error propagation in AESCryptoModule

Summary:
ENG-8131.
The try! disabled error propagation to JS so the app crashes when decryption fails

Test Plan:

let key = new Uint8Array(16);
let data = new Uint8Array(12+16+5);
let buffer = new Uint8Array(10); // too small
try {
  AESCryptoModule.decrypt(key, data, buffer);
} catch (err) {
  // got InvalidDataLengthException from AESCryptoModule.swift L175
  console.log(err);
}

Reviewers: marcin

Reviewed By: marcin

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D12104

Details

Provenance
bartekAuthored on May 20 2024, 1:04 AM
Reviewer
marcin
Differential Revision
D12104: [native] Fix error propagation in AESCryptoModule
Parents
rCOMMd5b5fd5fc80a: [identity] remove extra line
Branches
Unknown
Tags
Unknown