os.stat - time format conversion + md5

DP pennedinil at excite.com
Wed Dec 18 00:00:14 EST 2002


Thanks all for all of your help. 

It was brought up a few times - why bother converting the stat time to
human readable format? This is because all copy operations need to be
logged, and the log will be referenced by other tools.

Another suggestion I found extremely helpful was about the difference
between sha and md5. I wasn't even aware of the sha package.

In case it's not obvious, yes, I'm very new to the Python world.

Thanks again.

Regards,
Dinil

Chad Netzer <cnetzer at mail.arc.nasa.gov> wrote in message news:<mailman.1040155283.17061.python-list at python.org>...
> On Tuesday 17 December 2002 08:33, Jeff Epler wrote:
> 
> > You could also use the "sha" module.  Some people believe that
> > md5 has (theoretical) weaknesses that sha doesn't, which may make
> > it significantly easier to deliberately create two files with the
> > same md5sum than the number of bits in the digest suggests.  The
> > code would be the same, except you'd use 'sha.new' instead of
> > 'md5.new'
> 
> md5 is a faster algorithm than SHA (typically by about a factor of 
> two in real world tests), and assuming the application is not for 
> security (ie. you just want to avoid copying identical files, 
> rather than have a "Tripwire" type database for checking integrity 
> of executables and files, etc.) or you are not ultra-paranoid, md5 
> will probably be fine.



More information about the Python-list mailing list