Windows

The OpenSSL command line interface does not provide a way to specify the encryption password as an argument, which is a security feature.

However, you can use the echo and | (pipe) commands to pass the password to OpenSSL:

luaCopy codefor /r [folder path] %f in (*) do (echo Encryption4fun# | openssl enc -aes-256-cbc -salt -in "%f" -out "%f.enc" -pass stdin)

Replace [folder path] with the path to the folder you want to encrypt. This command will encrypt all files within the folder and add the extension .enc to the encrypted files. The password "Encryption4fun#" will be passed to OpenSSL through the echo and | (pipe) commands.

Last updated