Top-rated recipes tagged "sha_1"http://code.activestate.com/recipes/tags/sha_1/top/2009-12-06T19:02:40-08:00ActiveState Code RecipesGetting the SHA-1 (or MD5) hash of a directory (Python)
2009-12-06T19:02:40-08:00Stephen Akikihttp://code.activestate.com/recipes/users/4172143/http://code.activestate.com/recipes/576973-getting-the-sha-1-or-md5-hash-of-a-directory/
<p style="color: grey">
Python
recipe 576973
by <a href="/recipes/users/4172143/">Stephen Akiki</a>
(<a href="/recipes/tags/directory/">directory</a>, <a href="/recipes/tags/getting/">getting</a>, <a href="/recipes/tags/hash/">hash</a>, <a href="/recipes/tags/md5/">md5</a>, <a href="/recipes/tags/sha_1/">sha_1</a>, <a href="/recipes/tags/the/">the</a>).
Revision 4.
</p>
<h5><a href="http://akiscode.com/articles/sha-1directoryhash.shtml" rel="nofollow">http://akiscode.com/articles/sha-1directoryhash.shtml</a></h5>
<p>By definition a cryptographic hash is, "a deterministic procedure that takes an arbitrary block of data and returns a fixed-size bit string, the (cryptographic) hash value, such that an accidental or intentional change to the data will change the hash value". </p>
<p>Usually these hashes are used on files to "fingerprint" them, but in order to do the same to a directory you have to do something like this: </p>