Skip to content

Instantly share code, notes, and snippets.

@wellington1993
Created August 17, 2017 19:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save wellington1993/1a9d909c564dc7c9364a243d8ad43a0b to your computer and use it in GitHub Desktop.
MD5 hash Delphi
class function getMd5HashString(value: string): string;
var
hashMessageDigest5 : TIdHashMessageDigest5;
begin
hashMessageDigest5 := nil;
try
hashMessageDigest5 := TIdHashMessageDigest5.Create;
Result := IdGlobal.IndyLowerCase ( hashMessageDigest5.HashStringAsHex ( value ) );
finally
hashMessageDigest5.Free;
end;
end;
// From:
// https://stackoverflow.com/questions/58621/how-do-i-hash-a-string-with-delphi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment