I need to encrypt some info, send it to my Apache server, and decrypt it there.
I want to use C++ under Windows to encrypt, and PHP on the server side to decrypt.
I am trying to encrypt using CryptEncrypt(...) on Windows, and mdecrypt_generic(...) in PHP. When I encrypt the same data using C++ and PHP, the result is different. How can I set the parameters so the results are the same on both platforms? (I arbitrarily use MD5 to go from a password to a key, and RC2 to do the encryption/decryption.)
Thanks to anyone who have solved this problem before, and wants to share their insight!
- Magne