Encrypt Your Blog with GPG

I heard about GPG several years ago and finally decided to try it. I ran into some problems, but I figured out a solution that I posted on StackExchange. 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…

Category:

Description

I heard about GPG several years ago and finally decided to try it. I ran into some problems, but I figured out a solution that I posted on StackExchange.

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:

start
start
testing
test
end
end

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

jA0EBwMC3CKSq0cejGbi0lUB / cDbPdO + yRiZMkgpsz6GrcsBshWWc1VwBAaGqDFb
BqGJ / zliE1DY0 + CzKreNPhWjqs 91 + kMiMoMFOHsC8X + dozm + mOlyQ 81 dVu4jqbJC
fVhsyvSs
=eLuQ
----- 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.asc and 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.)

Example:

[] # 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
start
start
testing
test
end
end

Read More

Reviews

  1. pjbrunet

    Works with LinkedIn posts too.

Add a review

Your email address will not be published. Required fields are marked *

Vendor Information

  • Store Name: PLATINUM DREAM
  • Vendor: Platinum
  • Address:
  • No ratings found yet!