import hashlib


def hashfile(fpath, blocksize=65536):
    """
    Generate a unique hash value for a file's content
    """
    with open(fpath, 'rb') as f:
        hasher = hashlib.sha256()
        buf = f.read(blocksize)
        while len(buf) > 0:
            hasher.update(buf)
            buf = f.read(blocksize)
        return hasher.digest()