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

@@ -14,7 +14,7 @@ public class Seal {
System.out.println("Generazione chiavi RSA per il server web in corso...");
// Cifratura con Cifrario di Vigenere
// Cifratura con Cifrario di Vigenere (TODO)
app.post("/seal/vigenere/encrypt", ctx -> {
}
@@ -30,6 +30,15 @@ public class Seal {
);
// Decifratura con Cifrario di Cesare (Attacco Bruteforce !!)
app.post("/seal/caesar/decrypt", ctx -> {
RichiestaCesare req = ctx.bodyAsClass(RichiestaCesare.class);
String[] ciphertext = Caesar.decode(req.ciphertext);
ctx.json(ciphertext);
}
);
// Cifratura con RSA
app.post("/seal/rsa/encrypt", ctx -> {
// Legge i dati nel body dalla richiesta
@@ -60,8 +69,8 @@ public class Seal {
class RichiestaCesare {
public int key;
public String plaintext;
// Costruttore della richiesta
public String ciphertext;
public RichiestaCesare() {}
}
class RichiestaRSA {