Python - Using Hashlib
Revision as of 19:26, 9 April 2018 by PeterHarding (talk | contribs) (Created page with " <pre> import hashlib def get_sha256_hash(filename): m = hashlib.sha256() with open(filename, 'rb', buffering=0) as f: for b in iter(lambda : f.read(128*1024), b''):...")
import hashlib def get_sha256_hash(filename): m = hashlib.sha256() with open(filename, 'rb', buffering=0) as f: for b in iter(lambda : f.read(128*1024), b''): m.update(b) return m.hexdigest()