How do I make an MD5 hash of a string with Delphi?
If you want an MD5 digest and have the Indy components installed, you can do this:
uses SysUtils, IdGlobal, IdHash, IdHashMessageDigest;
with TIdHashMessageDigest5.Create do
try
Result := TIdHash128.AsHex(HashValue('Hello, world'));
finally
Free;
end;
Most popular algorithms are supported in the Delphi Cryptography Package:
Update
DCPCrypt
is now maintained by Warren Postma and source can be found here.