MD5Hash returns the MD5 hash of the Input string. This hash will be Base64 encoded.

An MD5 hash takes any length string, and encodes it into a 128-bit fingerprint. Using this fingerprint, the MD5 hash algorithm will create the same exact 128-bit hash fingerprint from the same string, no matter how many times it is created - it will never vary.

MD5 hashes are commonly used when storing passwords, credit card numbers or other sensitive data, and are used to ensure the data integrity in files by allowing easy comparison of the hash of the source file with the hash of the created destination file.

It is a one-way transaction and cannot be reverse engineered to discover the original string.

Declaration: Function MD5Hash(Input : String): String;

Here are a few examples.

procedure OnMapEvent(var Value:Variant);
var
MyString, MyOtherString, MyLastString : string;
begin
//Make an MD5Hash in Base64
//Result will be 'q45qsH1Hx/+kPi+ajgfxrw=='
MyString := MD5Hash('Hello Cameron');
 
//Result will be 'MJt0HvJby5D5GQjNdFZLcg=='
MyOtherString := MD5Hash('hello cameron');
 
//Result will be '1TS5bJwjEDepgSaJHsiY6w=='
MyLastString := MD5Hash('Password12345');
end;