I’m trying to exchange / send an encrypted string from my c++ software to a web script running in PHP. The C++ software encrypts the string and the Web uses PHP to decrypt it and store it in the DB.
But i have a problem. Every time i try to send the string to my web script the decryption is incorrect. Both of the environments’ (C++, PHP) have been tested to successfully encrypt and decrypt their own strings which are made locally. I think that something gets lost in the transaction as the characters of the encrypted string are something like this. y ½Ô^ Ô Q³4N8@4Ð|÷Ã ˆ¸
‘€‡ and I already tried to BASE64 encode it during the transaction and I also tried to HEX encode the string during the transaction but it didn’t help. I’m currently trying URL encode but I doubt that it's going to help.
The PHP script is using UTF-8 encoding, the character set in the c++ software is "Use Multi-Byte Character Set",
How can I ensure to successfully transport the encrypted string to my Web Script so it can be decrypted? How do you guys do it?
When comparing the encrypted string in C++ and the received encrypted string in PHP I can see that some unusual special characters get changed to ? or something like that while the majority of the encrypted string remains the same.
Thank you for your help,