I want to encrypt a message in php with a known password using blowfish. I would then be like to decrypt this message in python.
This is useful even if you want to encrypt in one language and decrypt elsewhere.
I searched quite extensively but could not find any conclusive solution, so I thought to record my findings.
Note it is quite simple to encrypt/decrypt in same language such as python or php.
This solution is very simple but it took me a while to figure out.
Blowfish Params
php code:
This outputs 3C8f2kaD8Of0INYk3l9qEg==
python code:
This code outputs 3C8f2kaD8Of0INYk3l9qEg== too
Now suppose you want to decrypt some string in python encrypted in php. First do b64decode and then decrypt the result.
Happy encrypting and decrypting!!!