MD5Fingerprint()

Syntax

Result$ = MD5Fingerprint(*Buffer, Size)
Description
Returns a 32 characters long MD5 (Message Digest 5) hash code for the given buffer.

Parameters

*Buffer The buffer containing the data to be hashed.
Size The size of the given buffer.

Return value

Returns the hash code as a string.

Remarks

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.

Example: string as memory buffer

  test.s = "This is a test string!"
  Debug MD5Fingerprint(@test, StringByteLength(test))

Example: 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

See Also

MD5FileFingerprint(), ExamineMD5Fingerprint(), SHA1Fingerprint(), CRC32Fingerprint()

Supported OS

All

<- MD5FileFingerprint() - Cipher Index - NextFingerprint() ->