The following file encryption method works on OS X Yosemite:
Encrypt: openssl enc -aes-256-cbc -salt -in file.zip -out file.zip.enc
Decrypt: openssl enc -aes-256-cbc -d -in file.zip.enc -out file.zip
However, when on OS X El Capitan I get this error:
unknown option '-aes-256-cbc -in file.enc'
Any solutions?
Best Answer
You likely have a shell quoting problem. The command works just fine for me in 10.11.4:
Check to make sure that your calling program is treating
-aes-256-cbc
as a single option and isn't quoting it when sending it in to the shell. It looks like it's calling the program with option cluster"-aes-256-cbc -in file.enc"
which actually isn't a valid, single option foropenssl
.If you can provide more details about how you're calling
openssl
I can give you more specific guidance.