@jimyX, Thank you very much for your reply. OK it work correctly while encrypt and decrypt with Delphi 2010 Thanks!. But when encrypt with Php and try to decrypt with delphi or Encrypt with Delphi and try to decrypt with Php it does not work.

greetings charin1904, , I have looked at the code for function TeaEncrypt( ) in the DelphiCode-updated.zip, , and in the code for function TeaEncrypt( ) in the original question which I posted, the only change I could see was the pointer reference to the input string -
pTa := PByte(PChar(InStr));
changed to -
pTa := PByte(PansiChar(InStr));

although I did not go through it line by line. I can not run the 2010 Delphi code, I do not have or use Delphi 2010. . .
When I tested this the PHP and Delphi functions, both encrypt and decrypt using the HEX strings as output, worked in both directions (php to delphi, , and delphi to php), from your comments, the delphi functions work for a delphi only run, and the PHP functions work for a PHP only run, but does not work for a Delphi output to a PHP input run.
If this is the case, I am unsure about how to go about debugging this, since the Delphi code seems unchanged, and the PHP code is likely the same also?

Please consider some encryption Factors, the Keys must be Identical , the Key Arrays in this case, and the verify arrays must be the same.
It looks like they are the same in the code that I have seen, so That may not be it?

I really do not understand why someone would place the key and verify array ini in the form ini function? shouldn't you set the key in the same function you call the TeaEncrypt( ).

Anyway, if you have the time or inclination, you might change the key and verify in each for testing as in -

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Both of them.
I get "time out" for the first, and "connection was reset" for the second.

This variance might be due to nonconformity in the coding between the php and Delphi. That's the only reason that you can get different result for using same key and text (i.e. if it was the same sequence of math and codes the result will always be the same).

Now the point is to know which is correct the php or the Delphi. You may use the Delphi component from the link below and encode/decode any text and match its result by using the code in question to find out which one is in conformity with it.http://www.cityinthesky.co.uk/opensource/DCPcrypt

Featured Post

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.
Login to your Google Account, then Google for "Google M…