Sometimes you just need to send a file that nobody else should read. GnuPG can encrypt it with a passphrase, or to the public key of a recipient.
gpg --symmetric --armor --output secret.txt.asc secret.txt
gpg --encrypt --recipient [email protected] --output secret.txt.gpg secret.txt
gpg --decrypt --output secret.txt secret.txt.gpg
--symmetric (-c) encrypts with a passphrase instead of a public key. The manual says the default cipher is AES-128, which --cipher-algo can change. --encrypt (-e) encrypts to a public key, and --recipient (-r) names whose. That key must already be in your keyring.
By default the output is binary OpenPGP. --armor produces ASCII text that you can paste into a mail. --output names the result, and --decrypt reverses it.
The caveat is that the original stays where it is. GnuPG does not remove secret.txt, so the plain file is still on the disk until you delete it yourself. Lose the passphrase or the private key, and the encrypted file is gone for good. The manual also notes that gpg caches the passphrase used for symmetric encryption, so a later decrypt may not ask again. --no-symkey-cache turns that off, which is worth doing on a shared machine.
Further reading: GnuPG: gpg(1) manual