2025-09-11 10:32:09 -04:00

8 lines
401 B
Bash
Executable File

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