What annoyed me though, the output didn’t seem like it would work in a blog. Well, I figured that out too.
Here’s an example test message called test.txt:
In Linux, we can encrypt this like…
gpg -ac --pinentry-mode=loopback test.txt
This creates a file called test.txt.asc that looks like this…
-----BEGIN PGP MESSAGE-----
-----END PGP MESSAGE-----
Can you post this anywhere? Maybe, maybe not. At least for now, it works with LinkedIn posts. Social networks might change the formatting slightly enough to corrupt your message. But worth trying, just for fun.
Copy-paste this into a file on your PC. Then run
gpg --pinentry-mode=loopback test.txt.ascand use the password: asdf
Does it work with WordPress? Yes and no. Apparently, if you use blockquote, WordPress changes the dashes, so use the code tag instead and it works. (Or just remember to use five dashes, etc.) Paste the encrypted text into whatever.gpg (filename doesn’t matter.)
# gpg --pinentry-mode=loopback whatever.blah
gpg: WARNING: no command supplied. Trying to guess what you mean ...
gpg: AES encrypted data
gpg: encrypted with 1 passphrase
gpg: whatever.blah: unknown suffix
Enter new filename [test.txt]:
# cat test.txt
PS: You don’t necessarily need the -a option for “ascii armored output.” Also this explains why you probably want to use the “loopback” option.