Why is encryption algorithm may give different results in AS3 and PHP? In AS3 I use library from http://labs.boulevart.be/index.php/2007/05/23/encryption-in-as2-and-as3/. And in PHP I use RC4 Cipher.
Could some tell me what is the problem? Thanks.
Why is encryption algorithm may give different results in AS3 and PHP? In AS3 I use library from http://labs.boulevart.be/index.php/2007/05/23/encryption-in-as2-and-as3/. And in PHP I use RC4 Cipher.
Could some tell me what is the problem? Thanks.
Assuming the obvious like having the same key and initialisation values, you may want to look at the endianness assumptions of the two implementations.
If initial vector (iv) of the encryption libraries in not same (and it is unlikely to be the same as it should be random) the encryption will not give you same result.
If you want to check - check encryption with one and decryption with other and vise-verse
How are you comparing the two results? You could be looking at one result display as a hex string, and another in ASCII for example. Have you also tried comparing the result to online (such as from Wikipedia) test vector for some simple strings to see if you are getting expected result?