This is the GPG command line example to be used inside of automation as C# console application. This encryption/decryption will only use the password.
Encrypt
Basic format
gpg -o outputPath –cipher-algo AES256 –symmetric sourcePath
Example to be used inside of automation
echo letmeinPetbarn | gpg –batch –passphrase-fd 0 -o D:\Automations\Petbarn\EMListExtractAndFTP\DataOut\petbarn.csv.gpg –cipher-algo AES256 –symmetric D:\Automations\Petbarn\EMListExtractAndFTP\DataOut\petbarn.csv
Decrypt
Basic format
gpg -o targetFullPath –decrypt sourcePath
Example to be used inside of automation
echo letmeinPetbarn | gpg –batch –passphrase-fd 0 -o D:\Automations\Petbarn\EMListExtractAndFTP\DataOut\petbarn.csv –decrypt D:\Automations\Petbarn\EMListExtractAndFTP\DataOut\petbarn.csv.gpg
Relevant links
Five best file encryption tools
Encryption using .Net built in method