Created
August 17, 2017 19:25
-
-
Save wellington1993/1a9d909c564dc7c9364a243d8ad43a0b to your computer and use it in GitHub Desktop.
MD5 hash Delphi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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