held by hopes and dreams
All checks were successful
Deploy / trigger (push) Successful in 30s

This commit is contained in:
2026-04-20 22:03:38 +02:00
parent 4685f6fb4d
commit de24786cea
4 changed files with 15 additions and 148 deletions

View File

@@ -16,16 +16,14 @@ async function encrypt() {
async function decrypt() {
const ciphertext = document.getElementById("ciphertext").value;
const key = document.getElementById("key").value;
if (!ciphertext) return alert("Nessun testo da decifrare!");
try {
const res = await fetch("/seal/caesar/decrypt", {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ testo: ciphertext, chiave: parseInt(key) })
body: JSON.stringify({ ciphertext: ciphertext })
});
// TODO: SISTEMARE IL SISTEMA DI DECIFRATURA !!
document.getElementById("testoDecifrato").value = await res.text();
document.getElementById("decodedtext").value = await res.text();
} catch (e) { alert("Errore di connessione!"); }
}