Shared secret encryption with GPG
GPG must be the hardest CLI tool I have ever come across. I am no fan of GPG!
Use case protect an SQL dump with a shared secret "kensentme":
[hendry@t480s backup]$ gpg --symmetric dev-backup-1551421144.sql
GPG will prompt you for the password twice.
[hendry@t480s backup]$ ll dev-backup-1551421144.sql* -rw-rw-r-- 1 hendry users 195M Mar 1 14:19 dev-backup-1551421144.sql -rw-rw-r-- 1 hendry users 19M Apr 12 13:37 dev-backup-1551421144.sql.gpg
Don't be surprised to find the resulting encrypted .gpg file is compressed!
How to decrypt a file with a GPG symmetric key
gpg --decrypt --multifile dev-backup-1551421144.sql.gpg
Sometimes GPG won't prompt you for the password (e.g. "kensentme"), if you have entered the password before. Have some nerves and double check with a checksum tool.
Tested with gpg (GnuPG) 2.2.15. Kudos to grawity on #gnupg Freenode IRC.