Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Quick sha256sum implementation in Python
from hashlib import sha256
from sys import argv
for fn in argv[1:]:
if fn == '-':
f = sys.stdin
f = open(fn, 'rb')
with f:
print '%s *%s' % (sha256(, fn)
Copy link

conqp commented Apr 11, 2018

Missing import of sys.stdin.

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