From 48f0c35039bdb41fdf7001f7548c01dfae12296a Mon Sep 17 00:00:00 2001 From: elisabetta Date: Mon, 20 Apr 2026 22:22:49 +0200 Subject: [PATCH] hm --- backend/src/main/java/com/crypto/Seal.java | 1 - backend/src/main/resources/get/cesare.html | 1 - backend/src/main/resources/get/cesare.js | 7 +++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/com/crypto/Seal.java b/backend/src/main/java/com/crypto/Seal.java index 1757e03..80b839d 100644 --- a/backend/src/main/java/com/crypto/Seal.java +++ b/backend/src/main/java/com/crypto/Seal.java @@ -36,7 +36,6 @@ public class Seal { String[] ciphertext = Caesar.decode(req.ciphertext); ctx.json(ciphertext); } - ); // Cifratura con RSA diff --git a/backend/src/main/resources/get/cesare.html b/backend/src/main/resources/get/cesare.html index d301430..47feca9 100644 --- a/backend/src/main/resources/get/cesare.html +++ b/backend/src/main/resources/get/cesare.html @@ -32,7 +32,6 @@ efficace per messaggi veloci.

- diff --git a/backend/src/main/resources/get/cesare.js b/backend/src/main/resources/get/cesare.js index 3d2f838..8c1c2db 100644 --- a/backend/src/main/resources/get/cesare.js +++ b/backend/src/main/resources/get/cesare.js @@ -15,13 +15,12 @@ async function encrypt() { } async function decrypt() { - const ciphertext = document.getElementById("ciphertext").value; - - if (!ciphertext) return alert("Nessun testo da decifrare!"); + const c = document.getElementById("ciphertext").value; + if (!c) return alert("Nessun testo da decifrare!"); try { const res = await fetch("/seal/caesar/decrypt", { method: "POST", headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ ciphertext: ciphertext }) + body: JSON.stringify({ ciphertext: c }) }); const data = await res.json(); document.getElementById("decodedtext").value = JSON.stringify(data, null, 2);