It seems like openssl encryption with option "-e -pbkdf2" does not do the work. It simply encode the string with base64.
Code:
echo 'mysecretpassword' | openssl enc -base64 -e -pbkdf2 -pass pass:garbageKey
bXlzZWNyZXRwYXNzd29yZAo=
echo "bXlzZWNyZXRwYXNzd29yZAo=" | base64 -d
mysecretpassword
My openssl version:
OpenSSL 1.1.1f 31 Mar 2020
What am I doing wrong here?
Note:
Back in a days with OpenSSL 1.0.x I was able encrypt string using "-e -aes-256-cfb" and that worked very well:
Code:
Encrypt:
echo 'mysecretpassword' | openssl enc -base64 -e -aes-256-cfb -nosalt -pass pass:garbageKey
FHNEdyhPcJWL1CLWiersE6Y=
echo "FHNEdyhPcJWL1CLWiersE6Y=" | base64 -d
sDw(Op???":???
Decrypt:
echo 'FHNEdyhPcJWL1CLWiersE6Y=' | openssl enc -base64 -d -aes-256-cfb -nosalt -pass pass:garbageKey
mysecretpassword
Cheers
Czezz