Encrypt string from stdin

echo "hello world, encryption" | gpg -e -o hello.gpg -r tt@hotmail.com

Decrypt file to stdout

gpg -dq hello.gpg

List all keys

gpg -K