From c0b554b94cd3bc9cda6221efd115c4da755e8143 Mon Sep 17 00:00:00 2001 From: Rostislav Svoboda Date: Wed, 29 May 2024 14:04:20 +0200 Subject: [PATCH] notes --- notes/thgtoa.scrbl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/notes/thgtoa.scrbl b/notes/thgtoa.scrbl index 3b10b7c..5c19fc4 100644 --- a/notes/thgtoa.scrbl +++ b/notes/thgtoa.scrbl @@ -94,6 +94,16 @@ gpg --decrypt file.txt.gpg --output file.txt gpg --decrypt --quiet --for-your-eyes-only --no-tty ~/.passwords/gmail.gpg + # Encrypt Both File Content and Filename + # -c --symmetric + # -o --output + echo "file.txt" | gpg -c --cipher-algo AES256 -o filename.gpg && \ + gpg -c --cipher-algo AES256 -o filecontent.gpg file.txt + # Decrypt the Filename and File Content + gpg --decrypt filename.gpg > decrypted_filename.txt && \ + gpg --decrypt filecontent.gpg > "$(cat decrypted_filename.txt)" && \ + rm decrypted_filename.txt # or permanent delete by `shred` + # -A NUM, --after-context=NUM # man gpg | grep --after-context=2 show-usage Key usage / flags: E=encryption, S=signing, C=certification, A=authentication