MD5Fingerprint()
Syntax
Result$ = MD5Fingerprint(*Buffer, Size)Description
Returns a 32 characters long MD5 (Message Digest 5) hash code. Here is a quick explanation taken from the RFC 1321 on MD5:
'The algorithm takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input. It is conjectured that it is computationally infeasible to produce two messages having the same message digest, or to produce any message having a given pre-specified target message digest. The MD5 algorithm is intended for digital signature applications.'
MD5 hashs are often used for password encryption, providing a very strong and standard protection. More information can be found in the RFC 1321: http://www.ietf.org/rfc/rfc1321.txt.
MD5FileFingerprint() can be used to calculate the MD5 checksum of a file.
ExamineMD5Fingerprint() can be used to calculate a MD5 checksum in multiple steps.
Example 1 (a string as memory buffer):test.s = "This is a test string!" Debug MD5Fingerprint(@test, StringByteLength(test))Example 2 (with memory buffer):*Buffer = AllocateMemory(500) If *Buffer PokeS(*Buffer, "The quick brown fox jumps over the lazy dog.") MD5$ = MD5Fingerprint(*Buffer, MemorySize(*Buffer)) Debug "MD5 Fingerprint = " + MD5$ FreeMemory(*Buffer) ; would also be done automatically at the end of the program EndIf
Supported OS
All