I made something similar, but the payload gets encrypted with the users ssh rsa key instead of pgp (that not many use):
./sshencdec.sh -p <(curl -sf "https://github.com/S2-.keys" | \
grep ssh-rsa | tail -n1) < plain-text-file.txt
It's just a simple bash script really, but it works, and almost everyone has a github account and an ssh key set up, so it works out of the box with most developers.