MD5 Hash Strings, Streams, And Files In Delphi XE5 Firemonkey For IOS And Android

Delphi XE5 Firemonkey MD5 HashIf 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:

Head over and download the hashutil library code snippet for use in your projects.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

MD5 Hash Strings, Streams, And Files In Delphi XE5 Firemonkey For IOS And Android by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

One Response to MD5 Hash Strings, Streams, And Files In Delphi XE5 Firemonkey For IOS And Android

  1. Vijay says:

    Hi ,

    I am trying to get a api or component which is Delphi XE5 equivalent of SHA1Managed. I tried all the alternatives available on net but i am not getting any proper results. In C# i am first UnicodeEncoding the string and then computing hash. I found couple of components like JEDI,or some custom build but non of them are giving me proper result. I have tried Indy as well but i am still failing in getting a proper result.

    Thanks in advance.
    Vijay K

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Firemonkey 3D Planets Android IOS
Quickly Build An Animated 3D Planet Scene With Firemonkey For Android And IOS

David Intersimone from Embarcadero has a post up about building a 3D scene of Earth and Mars using Firemonkey. The...

Close