ExamineMD5Fingerprint()
Syntax
Result = ExamineMD5Fingerprint(#Fingerprint)Description
Initializes the calculation of a MD5 (Message Digest 5) checksum in several steps. Unlike the MD5Fingerprint() function this allows to calculate the checksum of large data without the need to load it all into one continuous memory buffer. See MD5Fingerprint() for more information on the MD5 algorithm.
The '#Fingerprint' value will be used in later calls to refer to this checksum calculation. If #PB_Any is used as '#Fingerprint' parameter, the value returned as a result will be used to identify the calculation.
NextFingerprint() can be used to add memory blocks into the calculation and FinishFingerprint() to finish the calculation and read the MD5 hash.
Example:
*Buffer = AllocateMemory(200) ; Prepare a buffer with data If *Buffer PokeS(*Buffer, "The quick brown fox jumps over the lazy dog.") Length = MemoryStringLength(*Buffer) If ExamineMD5Fingerprint(1) ; start the calculation NextFingerprint(1, *Buffer, Length/2) ; calculate part 1 NextFingerprint(1, *Buffer+Length/2, Length/2) ; calculate part 2 MD5$ = FinishFingerprint(1) ; finish calculation Debug "MD5 checksum = " + MD5$ MD5$ = MD5Fingerprint(*Buffer, Length) ; compare to a calculation in 1 step Debug "MD5 checksum = " + MD5$ EndIf FreeMemory(*Buffer) EndIf
Supported OS
All