This works with OpenSSL 1.0.2o:
$ echo s+pQpLgAQKY6z9fNtBz63A== | openssl enc -a -d -aes-256-cbc -k a -nosalt
foobar
The same command doesn't work with OpenSSL 1.1.0g:
bad decrypt
140479496508672:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:../crypto/evp/evp_enc.c:536:
Is there a command-line which works with both versions? If not, is there a command-line flag which I can add for OpenSSL 1.1.0g to make it work?
Adding -md md5
to the command makes it work in both versions (1.0.2o and 1.1.0g).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With