π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Free the wasm EncryptedBox after copying it in encryptBox
Manav Rathi4a6b46c894ad
diff --git a/web/packages/wasm-core/index.ts b/web/packages/wasm-core/index.tsindex 6b8f5d4008..0cdd0d3412 100644--- a/web/packages/wasm-core/index.ts+++ b/web/packages/wasm-core/index.ts@@ -37,7 +37,11 @@ export const encryptBox = async (): Promise<EncryptedBox> => {const wasm = await loadWasmCore();const box = wasm.encryptBox(data, key);- return { encryptedData: box.encryptedData, nonce: box.nonce };+ try {+ return { encryptedData: box.encryptedData, nonce: box.nonce };+ } finally {+ box.free();+ }};/**