md5 check
contro opinion
contropinion at gmail.com
Thu Apr 19 03:46:18 EDT 2012
>>> import hashlib
>>> f=open('c:\gpg4win-2.1.0.exe','rb')
>>> print hashlib.md5(f.read()).hexdigest()
ad6245f3238922bb7afdc4a6d3402a65
>>> print hashlib.sha1(f.read()).hexdigest()
da39a3ee5e6b4b0d3255bfef95601890afd80709
i get it with md5,why the sha1 is wrong?
the sha1 right is
f619313cb42241d6837d20d24a814b81a1fe7f6d
2012/4/19 Jason Friedman <jason at powerpull.net>
> > i have download file (gpg4win-2.1.0.exe from
> > http://www.gpg4win.org/download.html)
> > when i run :
> >
> > Type "help", "copyright", "credits" or "license" for
> >>>> import md5
> >>>> f=open('c:\gpg4win-2.1.0.exe','r')
> >>>> print md5.new(f.read()).hexdigest()
> > 'd41d8cd98f00b204e9800998ecf8427e'
> >
> > it is not = f619313cb42241d6837d20d24a814b81a1fe7f6d gpg4win-2.1.0.exe
> > please see :gpg4win-2.1.0.exe from
> http://www.gpg4win.org/download.html
>
> Are you wanting md5 or sha1?
>
> http://www.bresink.de/osx/sha1.html
> http://www.gpg4win.org/download.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120419/a503ffcc/attachment.html>
More information about the Python-list
mailing list