import uuid


def generate_area_id(file_name, x, y, width, height, category_id):
    """Generate unique byte from input values for pathology tile record"""
    uri_base = "pathilico.org/v1/file/{}/area/".format(file_name)
    params = "category/{}/x/{}/y/{}/width/{}/height/{}".format(
        category_id, x, y, width, height
    )
    pf_id = uuid.uuid5(uuid.NAMESPACE_URL, uri_base + params).bytes
    return pf_id