dison Posted November 29, 2012 Posted November 29, 2012 I have a function to calculate MD5 hash of a string that work fine in a win32 app but this same function fail on unigui return a empty string function TFLogin.MD5(const text: string): string; var md5 : TIdHashMessageDigest5; begin md5 := TIdHashMessageDigest5.Create; Result := LowerCase(md5.HashStringAsHex(text, TEncoding.ASCII)); md5.Free; end; 1 Quote
Administrators Farshad Mohajeri Posted November 29, 2012 Administrators Posted November 29, 2012 Since you have full source code for Indy and Delphi you must be able to trace the code and debug it yourself. 1 Quote
gpaulino Posted November 29, 2012 Posted November 29, 2012 this file can use the MD5 code delphi club is solamnete I put it in a country that could be used to more easily: attached file and put the example how to use. Note: change the file extension from. Txt to. Pas // sha1 ShowMessage(CalcHash2('The quick brown fox jumps over the lazy dog',haSHA1)); // md5 ShowMessage(CalcHash2('The quick brown fox jumps over the lazy dog',haMD5)); Hope this helps Hashes.txt Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.