def enc_xgboost_model()

in src/ppxgboost/PPBooster.py [0:0]


def enc_xgboost_model(ppBoostKey: PPBoostKey, trees: list, metaData):
    """
    Encrypts the model (trees) to an encrypted format.
    :param ppBoostKey: the pp boost key wrapper.
    :param metaData: metaData containing min, max information
    :param trees: the model as an input (a list of trees)
    """
    he_pub_key = ppBoostKey.get_public_key()
    prf_hash_key = ppBoostKey.get_prf_key()
    ope = ppBoostKey.get_ope_encryptor()

    for t in trees:
        enc_tree_node(he_pub_key, prf_hash_key, ope, t, metaData)
    return trees