Calculate sha1 hash of a binary file

LaundroMat Laundro at gmail.com
Thu Aug 7 07:51:15 EDT 2008


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 primarily be media
(video) files.

Thanks,

Mathieu



More information about the Python-list mailing list