Delphi 2010 n madCrypt

delphi package - madRes, madTools, madStrings, ...

Delphi 2010 n madCrypt

Postby ira » Mon Dec 14, 2009 6:53 am

Right now I am using Delphi 2010 and I got some error in my unit

Code: Select all
uses
  madCrypt;

function EncString(const Str: string; const Key: string): string;
var
  S: string;
begin
  S := Str;
  Encrypt(S, Key); //error
  S := Encode(S);
  Result := S;
end;



[DCC Error] uCrypt.pas(xx): E2250 There is no overloaded version of 'Encrypt' that can be called with these arguments

Any suggestion?

Thx.
ira
 
Posts: 49
Joined: Mon Dec 14, 2009 6:29 am

Postby madshi » Mon Dec 14, 2009 8:36 am

madCrypt only supports ANSI strings. The "string" keyword in Delphi 2010 now signals a wide string (2 bytes per characters). That's not supported by madCrypt. If you replace all "string" words in the code you posted here with "AnsiString", the problem should go away.
madshi
Site Admin
 
Posts: 9477
Joined: Sun Mar 21, 2004 5:25 pm


Return to madBasic

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron