(fname)
return hash_sha256.hexdigest()
Return sha256 of a given filename

    Copied from https://stackoverflow.com/a/3431838
Return sha256 of a given filename
Return sha256 of a given filename
def sha256_file(fname):
    """
    Return sha256 of a given filename

    Copied from https://stackoverflow.com/a/3431838
    """
    hash_sha256 = hashlib.sha256()
    with open(fname, "rb") as f:
        for chunk in iter(lambda: f.read(4096), b""):
            hash_sha256.update(chunk)
    return hash_sha256.hexdigest()
def sha256_file ( fname ) : hash_sha256 = hashlib . sha256 ( ) with open ( fname , "rb" ) as f : for chunk in iter ( lambda : f . read ( 4096 ) , b"" ) : hash_sha256 . update ( chunk ) return hash_sha256 . hexdigest ( )