Wayne Roser wrote:

Hi
I have a friend who wants to encript a string in php and decrypt using
delphi.
Apparently it didn't work so he tried encripting "Hello world" (of course)
in php and delphi he gets different result strings using the "same"
encryption algorithm.
Any clues?

Yep... his algorithm or key is probably different on both :>

If he's using a PRNG to generate keys or encode data, have him test the output of the PRNG to make sure both version generate the same numbers. I ran foul of that with some bad assumptions between ECMAScript and C++ (floating point precision).

So... check key/key-stream, then check the implementation of the algorithm to make sure the PHP and Delphi versions are identical (not just 'close enough'). Run some more test strings through and examine the outputs for similarities, and for tell-tales like one output being smaller than the other.

--
Corey Murtagh
The Electric Monk
"Quidquid latine dictum sit, altum viditur!"
--
Message scanned by the Sheriff


_______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to