def METHOD_NAME(self, plaintable, mode, hash_operator, salt):
    """
    adapted from CryptorExecutor
    Process the input Table as (k, v)
    (k, enc_k) for mode == 0
    (enc_k, -1) for mode == 1
    (enc_k, v) for mode == 2
    (k, (enc_k, v)) for mode == 3
    (enc_k, k) for mode == 4
    (enc_k, (k, v)) for mode == 5
    :param plaintable: Table
    :param mode: int
    :return: Table
    """
    if mode == 0:
        return plaintable.map(
            lambda k, v: (
                k, self.curve.encrypt(
                    hash_operator.compute(
                        k, suffix_salt=salt))))
    elif mode == 1:
        return plaintable.map(
            lambda k, v: (
                self.curve.encrypt(
                    hash_operator.compute(
                        k, suffix_salt=salt)), -1))
    elif mode == 2:
        return plaintable.map(
            lambda k, v: (
                self.curve.encrypt(
                    hash_operator.compute(
                        k, suffix_salt=salt)), v))
    elif mode == 3:
        return plaintable.map(
            lambda k, v: (
                k, (self.curve.encrypt(
                    hash_operator.compute(
                        k, suffix_salt=salt)), v)))
    elif mode == 4:
        return plaintable.map(
            lambda k, v: (
                self.curve.encrypt(
                    hash_operator.compute(
                        k, suffix_salt=salt)), k))
    elif mode == 5:
        return plaintable.map(
            lambda k, v: (self.curve.encrypt(hash_operator.compute(k, suffix_salt=salt)), (k, v)))
    else:
        raise ValueError("Unsupported mode for elliptic curve map encryption")