def encrypt_int(message, ekey, n):

    if type(message) is types.IntType:
        return encrypt_int(long(message), ekey, n)

    if not type(message) is types.LongType:
        raise TypeError("You must pass a long or an int")

    if message > 0 and \
            math.floor(math.log(message, 2)) > math.floor(math.log(n, 2)):
        raise OverflowError("The message is too long")

    return fast_exponentiation(message, ekey, n)
Encrypts a message using encryption key 'ekey', working modulo
dataset/ETHPy150Open CouchPotato/CouchPotatoServer/libs/rsa/_version133.py/encrypt_int