wynemo
10/7/2015 - 2:53 PM

python my-sha256.py your_file

python my-sha256.py your_file

import hashlib
import sys

h = hashlib.sha256()
f = sys.argv[1]
with open(f, 'rb') as f:
    while 1:
        s = f.read(64*1024)
        if not s:
            break
        h.update(s)
print h.hexdigest()