![]() |
|
#1
|
|||
|
|||
|
Delphi + DCPCrypt 2 (RC6) vs RAD Studio + DCPCrypt 2 (RC6) = KABOOM!
Hi...
Just a question: I've coded an application with delphi, that generates files encrypted with RC6, just as a security measure so the user must generate file through the program and not by hand with notepad. Later on...i moved to RAD Studio XE and used exactly the same files (no modifications at all), to further develop the program to version 2. Well...hard to say, but RC6 fails. Files generated by version 1 (delphi 7) are unreadable from version 2 (rad studio xe). From what i see, difference is not so important...it happens very rarely... here it is an example: Plain String before encryption: ###BDB###R#G#Gx#V#RG#RGx#RV#GG#GV#GxVx#GxVy#RGG#RGV#RGxVx#RGxVy#R#G#Gx#V#RG#RGx#RV#GG#GV#GxVx#GxVy#RGG#RGV#RGxVx#RGxVy###EDB######BOB###3###EOB### Plain String after decryption: ###BDB#oŽVÌ'#$0090'NŒ™^Z'#$11'‹.M™“#RV#GG#GV#GxVx#GxVy#RGG#RGV#RGxVx#RGxVy#R#G#Gx#V#RG#RGx#RV#GG#GV#GxVx#GxVy#RGG#RGV#RGxVx#RGxVy###EDB######BOB###3###EOB### As you can see...something breaks in the middle...you can try with various other strings...and it happens the same...even multiple times if the string is long enough. One thought came to my mind: Delphi 7 is ASCII while RAD Studio XE is UNICODE. That causes many problems and a new version of DPCrypt 2 has been released to address UNICODE issues... I have even problems encrypting and decrypting with the same library on RAD Studio XE by itself...it encrypts but after decryption the result is the same of above. So the question is: a) is it normal that going unicode, i receive different results. If I try on delphi 7 everything is fine...on rad studio and between different versions of delphi the entire thing go mess. b) what can be the problem? dpcrypt 2, unicode, rad studio xe or other things? It's a month that I'm bashing my head on the pc without a solution...tried to change everything but this is the most close to unencrypted i got... Thanks in advance to everyone... (P.S. I can share the code if necessary, nothing secret) |
| Thread Tools | |
| Display Modes | |
|
|