import hashlib


def digest_check(file_path):
    """
    Generate hash digest for a file

    :param file_path:
    :return:
    """
    h = hashlib.blake2b()
    with open(file_path, "rb") as fh:
        for chunk in iter(lambda: fh.read(4096), b""):
            h.update(chunk)
    return h.hexdigest()