If you are building any kind of login system or you need file signatures in Delphi XE5 Firemonkey you may be looking for an MD5 hash function. MD5 hash functionality ships with Delphi XE5 in the Indy component set. An MD5 hash is basically a string of unique characters that will represent the data you give it whether it is a password or an MP3 file. However, the code to access it is rather long which is where this library called hashutil comes in. The library should be cross platform and run on Windows, Android, IOS, and OSX. It provides some wrapper functions around the MD5 hash functionality which makes it easier to use. There is a function for a straight string, a stream, and a file. These three functions cover a lot of the usage and formats that you might need an MD5 hash for. You could for example get the MD5 hash for a list of MP3 files and use the hash as a fingerprint to see if there are duplicate files.. You could also create an MD5 hash of a password so that you are not storing the actual password in clear text. Here is a sample function:
function MD5(S: String): String;
with TIdHashMessageDigest5.Create do
Result := HashStringAsHex(S);
MD5 Hash Strings, Streams, And Files In Delphi XE5 Firemonkey For IOS And Android by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Tokyo Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.