Re: [ROOT] Problem with TMD5

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Wed Aug 18 2004 - 17:30:20 MEST


Hi Damon,

  I've fixed the problem, fix is in cvs. Now TMD5 reports the same
digest as md5sum.

Cheers, Fons.


 
On Thu, 2004-07-08 at 19:46, Damon Spayde wrote:
> I would like to use the TMD5 ROOT class to calculate MD5 checksums of 
> certain files.  However, I have found that MD5 checksums calculated with 
> TMD5 are not the same as those calculated with other methods, e.g. 
> 'md5sum' on Linux machines.  Below is the output of a ROOT script 
> (attached as file md5test.cxx) that calculates the MD5 checksum of a 
> zero-length string with TMD5 and the output from md5sum:
> 
> [spayde@uiuc-gzero blinding]$ root -b md5test.cxx
>    *******************************************
>    *                                         *
>    *        W E L C O M E  to  R O O T       *
>    *                                         *
>    *   Version   4.00/04       5 June 2004   *
>    *                                         *
>    *  You are welcome to visit our Web site  *
>    *          http://root.cern.ch            *
>    *                                         *
>    *******************************************
> 
> Compiled for linux with thread support.
> 
> CINT/ROOT C/C++ Interpreter version 5.15.133, Apr 18 2004
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> root [0]
> Processing md5test.cxx...
> MD5 Check Sum of Zero Length String:
> 227b7f48d21283f63bc9bbc15b44ea1a
> root [1] .!echo -n "" | md5sum
> d41d8cd98f00b204e9800998ecf8427e  -
> root [2]
> 
> I get similar results (the MD5 sums do not agree between the two 
> methods) when using finite length strings or files.  I am running ROOT 
> version 4.00/04 on a RedHat Enterprise Linux 3 system.  Any help would 
> be greatly appreciated.
> 
> 					Regards,
> 					Damon
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://www.rademakers.org/fons/      Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET