MD5Match

Cryptography

Description

Compares two MD5 digests without an early exit

Syntax

Delphi

Function MD5Match(D1, D2: MD5Digest): Boolean;

Parameters

D1First digest
D2Second digest

Return values

FalseAt least one byte differs
TrueAll 16 bytes match

Remarks

The comparison ORs together the XOR of every byte before testing the accumulator, so the loop length never gives away where the first difference sits

See also

MD5String, MD5File, MD5Print