Update: same result for md5. Now what?

Neil Schemenauer nascheme at enme.ucalgary.ca
Fri Sep 15 19:51:56 EDT 2000


Thomas Weholt <thomas at cintra.no> wrote:
[on sha and md5 returning the same hash for two different files]
>The files are different. Is there something about jpg-compressed files that
>I should know about?

Its pretty hard to test this without having the two files your
using.  Can you either make them available or try using something
like the md5sum command to verify the hash your getting from
Python?

    >>> hash = md5.new(open('test.py').read()).digest()
    >>> ''.join(map(lambda x: '%.2x' % ord(x), hash))
    '07dd8b9ac8db659e4f64d14a18b81655'
    >>> 
    nas at cranky ~$ md5sum test.py
    07dd8b9ac8db659e4f64d14a18b81655  test.py

What version of Python are you using on what platform?

  Neil


-- 
Neil Schemenauer <nas at arctrix.com> http://www.enme.ucalgary.ca/~nascheme/



More information about the Python-list mailing list