1. 7zip, you might need to install the p7zip package, and you can make a password protected zip file.
EXAMPLE:
To encrypt
[pre]7za a -tzip protected.zip somefile.txt -ppassword[/pre]
To extract
[pre]7za x protected.zip[/pre]
(then type the password "password" when promoted, or use the -p option to skip the prompt)
2. Openssl, its installed on most linux distros and macs. There are several encryption options depending on the cyphyer you want, I used des3 for the example since its easy to type :)
To encrypt a file:
[pre]openssl des3 -a -salt -k password -in normalfile.txt -out encryptedfile.txt[/pre]
To decrypt the file:
[pre]openssl des3 -d -a -k password -in encryptedfile.txt -out normalfile.txt[/pre]
You can remove the -k and will be prompted to type the password on the fly.