mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
crypto: throw error if chunk decryption fails
This commit is contained in:
committed by
Abdullah Atta
parent
398432efde
commit
aa1fa0ca81
@@ -98,6 +98,7 @@ export default class Decryption {
|
||||
chunk,
|
||||
null
|
||||
);
|
||||
if (!message) throw new Error("Could not decrypt chunk.");
|
||||
controller.enqueue(message);
|
||||
if (tag === crypto_secretstream_xchacha20poly1305_TAG_FINAL)
|
||||
controller.terminate();
|
||||
|
||||
Reference in New Issue
Block a user