From 917797c9be68804f328f0526431c5b0a18b3c429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20B=C3=BClow?= Date: Wed, 4 Jan 2023 15:29:46 +0100 Subject: [PATCH] added decrypt, and file name handling --- src/lib/DecryptButton.svelte | 2 +- src/lib/EncryptButton.svelte | 7 ++----- src/lib/cryptlib.ts | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/lib/DecryptButton.svelte b/src/lib/DecryptButton.svelte index e732f8e..497642e 100644 --- a/src/lib/DecryptButton.svelte +++ b/src/lib/DecryptButton.svelte @@ -46,7 +46,7 @@ readFileContent(file).then((fileContent) => { decrypt(atob(fileContent)).then(decryptedContent => { console.log("Decrypted Base64: ", decryptedContent) - console.log(decodeURIComponent(escape(atob((decryptedContent))))); + console.log(decodeURIComponent(decryptedContent)); const decodedData = decodeURIComponent(escape(atob((decryptedContent)))); const outputArray = new Uint8Array(decodedData.length) for (let i = 0; i < decodedData.length; i++) { diff --git a/src/lib/EncryptButton.svelte b/src/lib/EncryptButton.svelte index cc8b937..e3e454d 100644 --- a/src/lib/EncryptButton.svelte +++ b/src/lib/EncryptButton.svelte @@ -1,7 +1,7 @@