hey hey hey hey
All checks were successful
Deploy / trigger (push) Successful in 22s

This commit is contained in:
2026-03-28 12:45:50 +01:00
parent d9220c011c
commit cc326efd03

View File

@@ -34,7 +34,7 @@ public class Seal {
Richiesta req = ctx.bodyAsClass(Richiesta.class); Richiesta req = ctx.bodyAsClass(Richiesta.class);
RSA.RSAkeys keys = RSA.defkeys(req.keysize / 2); RSA.RSAkeys keys = RSA.defkeys(req.keysize / 2);
String ciphertext = RSA.encrypt(req.text,keys.e(), keys.n()); String ciphertext = RSA.encrypt(req.text,keys.e(), keys.n());
ctx.result("{\"ciphertext\":"+ciphertext+",\"keys\":{\"d\":" + keys.d().toString() + ",\"n\":" + keys.n().toString() + "}}"); ctx.result("{\"ciphertext\":\""+ciphertext+"\",\"keys\":{\"d\":\"" + keys.d().toString() + "\",\"n\":\"" + keys.n().toString() + "\"}}");
}); });
// Decifratura con RSA // Decifratura con RSA