I am looking for a command-line encryption utility which allows passphrase to be supplied with the syntax. I checked Google and Bing but found few utilities that use Blowfish or some obsolete algorithms. Any utility which offers few modern algorithms and supports multiple encryption as well.
You can do that with GnuPG. Code: gpg -c --batch --passphrase 123456789 -o foo.gpg foo But do wipe command history afterwards
I tried GPG but it opens a dialog box to enter passphrase. ** Edited ** Thanks the syntax you provided worked. I tried gpg -help but didn't find those options.
Another solution: OpenSSL https://www.madboa.com/geek/openssl/#encrypt-simple Code: # provide password on command line openssl enc -aes-256-cbc -salt -in file.txt -out file.enc -pass pass:password # provide password in a file openssl enc -aes-256-cbc -salt -in file.txt -out file.enc -pass file:/path/to/secret/password.txt Or the command-line version of 7z: Code: 7z.exe a -ppassword secret.7z secret.txt 7z.exe a -ppassword secret.7z secret.txt -mhe