Flash-php Encrypted Data
[This is what I'm going to do:]
to be able to encrypt data in flash (AS3) and send it to PHP, php will decrypt the POST data and use it… and then when PHP is trying to send some variables back to flash, it will also encrypt them and send them back and flash will decrypt it and use it…
I need this to work properly for long list of variables being sent and received to and from PHP so that I can make my flash application more secure so that hackers won’t be able to submit false values to the php!
[This is where I got after a lot of searches:]
I found this AS3 library “as3crypto” and after I downloaded and played with it a bit, I was so happy but when I used it in a real project, it didn’t work as I expected it!
[This is the problem I am facing:]
ok, so we need to encrypt the data transfer between flash and php, right? so I used that library “as3crypto” from http://code.google.com/p/as3crypto/
and to show you the problem I’m facing, here is a demo I’ve uploaded to my server: http://emstris.com/sample/AS3/php_flash_encryption/test.html
when you click to send encrypted vars to php, it will work correctly but later, when php is sending the string “abcdefghijklmnopqrstuvwxyz” or something else, it doesn’t work correctly
you can clearly see that the returned result is not the string we were expecting…
I have placed the source FLA (CS4) and php files for you here:
http://emstris.com/sample/AS3/php_flash_encryption/php_flash_encryption.zip
[This is what I need from you:]
1) tell me what the heck is going wrong with that code that doesn’t send and receive encrypted data correctly!!!
2) if the first above request is solved, I need you to tell me if we can somehow integrate this with AMFPHP? is it possible at all? or maybe you have a better idea of encrypting data transfer between flash and PHP?
[This is what I do NOT want you to do:]
Please don’t show a hundered of your works in PMB! just talk about this problem and how you can solve it. PLEASE don’t try to sell me what I didn’t ask for!
Thanks,
Hadi
P.S As usual, I will add escrow only when you could prove to me that you are taking me to where I wanna go.




