hm
All checks were successful
Deploy / trigger (push) Successful in 24s

This commit is contained in:
2026-04-20 22:22:49 +02:00
parent be33e66d5c
commit 48f0c35039
3 changed files with 3 additions and 6 deletions

View File

@@ -32,7 +32,6 @@
efficace per messaggi veloci.</p>
<div class="crypto-box">
<label>Chiave (Numero di spostamento):</label>
<input type="number" id="key" value="3" placeholder="Es. 3"
style="width: 100%; padding: 12px; margin-top: 5px; margin-bottom: 15px; border-radius: 5px; border: 1px solid #ccc;">

View File

@@ -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);