I'm experiencing a lot of problems with MD5 unit when trying to calculate a MD5 hash of some files (At the moment I have 6 such files) Often I receive d41d8cd98f00b204e9800998ecf8427e which is a totally wrong hash. This hash is a hash of zero-byte file, thus it is not a valid hash for other files. If I calculate the MD5 of problematic files with other tools like MD5summs - I receive a valid hash.

It is not about the path to the file, because it is not working even if file is in the root of the drive.

Code used in function:
begin
        result := MD5Print(MD5File(file_name));
if AnsiCompareText(result, 'd41d8cd98f00b204e9800998ecf8427e') = 0 then result := 'Cannot calculate MD5';
end;

Platform is Win32.
Anyone has an idea what can be wrong?

If anyone want to take a look at the problematic files, please send a private mail, because the files are not for wider public.

regards
Boban
www.mc-antivirus-test.com


_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to