# ========================================================= # # ========================================================= import hashlib h = hashlib.sha256() fn = 'ludlow.png' with open(fn,'rb') as f: buf = f.read() print('buf len = {}'.format(len(buf))) h.update(buf) print(h.hexdigest()) print(h.digest_size) print(h.block_size)