Re: Calculate sha1 hash of a binary file

2008-08-07 Thread LaundroMat
On Aug 7, 2:22 pm, Paul Rubin wrote: > LaundroMat <[EMAIL PROTECTED]> writes: > > Would it be wise to calculate the hash value based on say for instance > > the first Mb? Is there a much larger chance of collusion this way (I > > suppose not). If it's helpful, the files w

Re: Calculate sha1 hash of a binary file

2008-08-07 Thread Paul Rubin
LaundroMat <[EMAIL PROTECTED]> writes: > Would it be wise to calculate the hash value based on say for instance > the first Mb? Is there a much larger chance of collusion this way (I > suppose not). If it's helpful, the files would primarily be media > (video) files. The usual purpose of using thi

Re: Calculate sha1 hash of a binary file

2008-08-07 Thread LaundroMat
I did some testing, and calculating the hash value of a 1Gb file does take some time using this method. Would it be wise to calculate the hash value based on say for instance the first Mb? Is there a much larger chance of collusion this way (I suppose not). If it's helpful, the files would primaril

Re: Calculate sha1 hash of a binary file

2008-08-07 Thread LaundroMat
Thanks all! -- http://mail.python.org/mailman/listinfo/python-list

Re: Calculate sha1 hash of a binary file

2008-08-07 Thread Nikolaus Rath
LaundroMat <[EMAIL PROTECTED]> writes: > Hi - > > I'm trying to calculate unique hash values for binary files, > independent of their location and filename, and I was wondering > whether I'm going in the right direction. > > Basically, the hash values are calculated thusly: > > f = open('binaryfile

Re: Calculate sha1 hash of a binary file

2008-08-06 Thread John Krukoff
On Wed, 2008-08-06 at 12:31 -0700, LaundroMat wrote: > Hi - > > I'm trying to calculate unique hash values for binary files, > independent of their location and filename, and I was wondering > whether I'm going in the right direction. > > Basically, the hash values are calculated thusly: > > f

Re: Calculate sha1 hash of a binary file

2008-08-06 Thread Tim Golden
LaundroMat wrote: Hi - I'm trying to calculate unique hash values for binary files, independent of their location and filename, and I was wondering whether I'm going in the right direction. Basically, the hash values are calculated thusly: f = open('binaryfile.bin') import hashlib h = hashlib.

Calculate sha1 hash of a binary file

2008-08-06 Thread LaundroMat
Hi - I'm trying to calculate unique hash values for binary files, independent of their location and filename, and I was wondering whether I'm going in the right direction. Basically, the hash values are calculated thusly: f = open('binaryfile.bin') import hashlib h = hashlib.sha1() h.update(f.re