Moved to D2009, Decrypt() in madCrypt no longer working

contains all delphi packages mentioned below
Post Reply
DaytonaDave
Posts: 9
Joined: Tue Dec 12, 2006 10:46 pm

Moved to D2009, Decrypt() in madCrypt no longer working

Post by DaytonaDave »

Hi,

Not sure if anyone else is seeing this problem, but after upgrading to D2009 and installing the latest madCollection for 2009 a bunch of my apps will no longer compile.

The issue seems to be with the procedure Decrypt(). It complains that there is no overloaded version of Decrypt() that can be called with these parameters.

I tried a couple of methods of converting to AnsiStrings, but I cannot seem to get Decrypt to work on data that was encrypted using the old version in D2007.

Has anyone else worked with this yet?

Thanks,
Dave
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Sorry for the late reply.

"madStrings.Decrypt" expects AnsiString. So you need to use AnsiString variables etc when using that function. I've heard before that there was trouble with Encrypt/Decrypt, but it was my impression that D2007 behaved different than the other Delphi versions. I've personally compared D7 and D2009 and Encrypt/Decrypt work just fine in any combination of those two Delphi versions. Unfortunately the D2007 installer refuses to install on my development machine. So I can't check D2007 myself right now.
DaytonaDave
Posts: 9
Joined: Tue Dec 12, 2006 10:46 pm

Post by DaytonaDave »

Thanks for getting back to me.

Unfortunately I have a lot of apps rolled out with config files encrypted in D2007. Nothing I have tried has let those be decrypted in D2009.

I have decided to create alternate config files for my D2009 apps, and just reset the old encrypted data to defaults. A bit of a pain, but not really a big deal.

Take care,
Dave
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

I'm sorry for the trouble. I don't really know what's going on. My best guess is that there's some kind of bug in D2007 which makes it behave differently than the other Delphi versions for my crypt functions, although I've no idea why that should be the case... :(
Post Reply