md5 for large files

Skip Montanaro skip at pobox.com
Tue Mar 4 12:47:50 EST 2003


    Bob> Can someone provide me with a snippet or pointer to usinging Python
    Bob> to verify the md5 value for a large file?  All examples I've seen
    Bob> are for a small string.  I'm not yet using GPG for NT and I need to
    Bob> verify or generate md5 values for file xfers.

How about the library reference manual section at:

    http://www.python.org/doc/current/lib/module-md5.html

The first example uses the .update() method.  Read your file in chunks and
call .update(), then .digest() when you're through.

Skip





More information about the Python-list mailing list