Checksum routine - new to Python

Paul Jackson pj at sgi.com
Thu May 18 18:11:45 EDT 2000


Dale wrote:
|> I need a little checksum routine

Do either of the md5 (128 bit) or sha (160 bit) modules
suit your needs?

--

def CheckSum (filepath):
    """ Sample CheckSum() routine, using md5 """
    import md5
    return md5.new(open (filepath).read()).digest()
-- 

=======================================================================
I won't rest till it's the best ...	   Software Production Engineer
Paul Jackson (pj at sgi.com; pj at usa.net) 3x1373 http://sam.engr.sgi.com/pj



More information about the Python-list mailing list