Skip to content

Instantly share code, notes, and snippets.

@robert-claypool
Last active August 23, 2020 21:28
Show Gist options
  • Save robert-claypool/a4a57c7a0b764a08d5d9 to your computer and use it in GitHub Desktop.
Save robert-claypool/a4a57c7a0b764a08d5d9 to your computer and use it in GitHub Desktop.
SHA1 digest calculation using Python's hashlib
import hashlib
print hashlib.sha1(open("c:\\temp\\my.file", "rb").read()).hexdigest()
@robert-claypool
Copy link
Author

Alternative: use sha1sum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment