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.
Parameters
#Fingerprint The number to refer to this checksum calculation in later calls. #PB_Any can be used to auto-generate this number.
Return value
Returns the #FingerPrint value if #PB_Any was used for that parameter.
Remarks
NextFingerprint() can be used to add memory blocks into the calculation and FinishFingerprint() to finish the calculation and read the MD5 hash.
See MD5Fingerprint() for more information on the MD5 algorithm.
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
See Also
MD5Fingerprint(), MD5FileFingerprint(), SHA1Fingerprint(), CRC32Fingerprint()
Supported OS
All