update for AC

This commit is contained in:
pGerhart
2025-09-11 10:32:09 -04:00
parent ab1e399768
commit f7da97c896
8 changed files with 626 additions and 368 deletions
+1
View File
@@ -0,0 +1 @@
{"c1":"Kg7PO4cAz5MEvfW2PNsWeYgIqPp+sFuyEJylelukYEMlaf2xJbP1EFpIt6/Prr5QKUKuf90Vp9qeEpNNjD+Hbw==","c2":"/cEpryemTCOMxhBdfqkuHFtG69/+rBpngUnb4aBeh3ZKTKbwyEMA8KPikl8xaGPO4xj0SC82kuqD/LkZvb00hA==","n":"0RrSr35GyOUJiyg/rsm1CSSnHjj9bJx6LwxY7fC7Ty4="}
+9
View File
@@ -0,0 +1,9 @@
{
"username": "alice",
"password": "correct horse battery staple",
"ciphertext": {
"c1": "XTLVdSI41jrdYZoy3yMObpUa6ZKE2p7eXEJyxNJGupq92ArGpIKZAIrHj0W69MNuaZDOXYQ4rNNetwaPfRKoYw==",
"c2": "W/3NHpAN07IlktQgc8vTGPtSDUkqm2RJqH+ovtRbbRmeTOSqDelzshZPLubeeiiBWZ2eYqcwhyvBGq4zN77lFw==",
"n": "KPeQdFyKETghj/5qj70MkSTD1rQ6TLcFiprzTnA+xwo="
}
}
+5
View File
@@ -0,0 +1,5 @@
{
"username": "alice",
"password": "correct horse battery staple",
"data": "hello ophe"
}
+7
View File
@@ -0,0 +1,7 @@
curl -sS -X POST http://127.0.0.1:8000/encrypt \
-H "Content-Type: application/json" \
--data-binary @encrypt.json \
| tee decrypt.json \
| jq -n --arg u "alice" --arg p "correct horse battery staple" --argfile ciphertext /dev/stdin \
'{username:$u, password:$p, ciphertext:$ciphertext}' \
| curl -sS -X POST http://127.0.0.1:8000/decrypt -H "Content-Type: application/json" --data-binary @-