Encrypt a file can be useful when we want to keep sensitive information but do not trust the site is being stored.
GnuPG allows to quickly and easily create encrypted files without the use of public keys or complicated procedures, just run the following at a Linux terminal:
$ gpg -c test.txt _
After you have run the command gpg -c, this will leave intact the original file and create another file called “test.gpg” in the same directory. This second file is the place where you want to prune without fear that information may be disclosed. You can then proceed to remove the original if needed.
To retrieve the contents of the file, perform the following process on the encrypted file:
$ gpg test.gpg _
GnuPG will automatically detect that it is an encrypted file, and request the key that first used.
Hope its useful 😉