$ gpg -c filename
To encrypt myfinancial.info file, type the command:
$ gpg -c myfinancial.info
This will create a myfinancial.info.gpg file.
Option: -c : Encrypt with symmetric cipher.
Caution if you ever forgot your password aka passphrase, you cannot recover the data as it use very strong encryption.
Task: decrypt file
To decrypt file use gpg command:
$ gpg myfinancial.info.gpg
gpg: CAST5 encrypted data
Decrypt file and write output to file vivek.info.txt you can run command:
$ gpg myfinancial.info.gpg –o vivek.info.txt
Remember if file extension is .asc, it is a ASCII encrypted file and if file extension is .gpg, it is a binary encrypted file.