import hashlib


def get_file_hash(filename):
    """
    Get the SHA256 hash of a given filename.
    """
    BLOCKSIZE = 1 << 16
    hasher = hashlib.sha256()
    with open(filename, 'rb') as fd:
        buf = fd.read(BLOCKSIZE)
        while len(buf) > 0:
            hasher.update(buf)
            buf = fd.read(BLOCKSIZE)
    return hasher.hexdigest()