Skip to content

Instantly share code, notes, and snippets.

@0x9fff00
Created February 25, 2017 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0x9fff00/5b741a8bac4d763b16a07f2163fb0dd8 to your computer and use it in GitHub Desktop.
Save 0x9fff00/5b741a8bac4d763b16a07f2163fb0dd8 to your computer and use it in GitHub Desktop.
Python SHA3-256
import hashlib, sys
sha3_256 = hashlib.sha3_256()
with open(sys.argv[1], 'rb') as f:
for chunk in iter(lambda: f.read(4096), b''):
sha3_256.update(chunk)
print(sha3_256.hexdigest())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment