md5 check

contro opinion contropinion at gmail.com
Wed Apr 18 23:06:17 EDT 2012


>>> import md5
>>> f=open('c:\gpg4win-2.1.0.exe','rb')
>>> print md5.new(f.read()).hexdigest()
ad6245f3238922bb7afdc4a6d3402a65
it is still not  equal  f619313cb42241d6837d20d24a814b81a1fe7f6d

please  try it on your computer ,
what is wrong?


2012/4/19 Dan Sommers <dan at tombstonezero.net>

> On Thu, 19 Apr 2012 09:31:05 +0800
> contro opinion <contropinion at gmail.com> wrote:
>
> > >>> 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
>
> Try opening the file in binary mode (untested):
>
> import md5
> f=open('c:\gpg4win-2.1.0.exe','rb')  # <-- look here
> print md5.new(f.read()).hexdigest()
>
> HTH,
> Dan
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120419/e6655b21/attachment.html>


More information about the Python-list mailing list