def rsa_enc(data, modulus, exponent):
    """
    Simple RAW RSA encryption method, returns byte string.
    Returns byte string of the same size as the modulus (left padded with 0)

    :param data:
    :param modulus:
    :param exponent:
    :return:
    """
    modulus = to_long(modulus)
    exponent = to_long(exponent)
    data = to_long(data)

    return long_to_bytes(pow(data, exponent, modulus), long_byte_size(modulus))
def rsa_enc ( data , modulus , exponent ) : modulus = to_long ( modulus ) exponent = to_long ( exponent ) data = to_long ( data ) return long_to_bytes ( pow ( data , exponent , modulus ) , long_byte_size ( modulus ) )
Simple RAW RSA encryption method, returns byte string.
    Returns byte string of the same size as the modulus (left padded with 0)

    :param data:
    :param modulus:
    :param exponent:
    :return: