'Produce the PKCS#1 OAEP encryption of a message.
This function is named ``RSAES-OAEP-ENCRYPT``, and is specified in
section 7.1.1 of RFC3447.
:Parameters:
message : string
The message to encrypt, also known as plaintext. It can be of
variable length, but not longer than the RSA modulus (in bytes)
minus 2, minus twice the hash output size.
:Return: A string, the ciphertext in which the message is encrypted.
It is as long as the RSA modulus (in bytes).
:Raise ValueError:
If the RSA key length is not sufficiently long to deal with the given
message.'

def encrypt(self, message):

    randFunc = self._key._randfunc
    modBits = Crypto.Util.number.size(self._key.n)
    k = ceil_div(modBits, 8)
    hLen = self._hashObj.digest_size
    mLen = len(message)
    ps_len = (((k - mLen) - (2 * hLen)) - 2)
    if (ps_len < 0):
        raise ValueError('Plaintext    is    too    long.')
    lHash = self._hashObj.new(self._label).digest()
    ps = (bchr(0) * ps_len)
    db = (((lHash + ps) + bchr(1)) + message)
    ros = randFunc(hLen)
    dbMask = self._mgf(ros, ((k - hLen) - 1))
    maskedDB = strxor(db, dbMask)
    seedMask = self._mgf(maskedDB, hLen)
    maskedSeed = strxor(ros, seedMask)
    em = ((bchr(0) + maskedSeed) + maskedDB)
    m = self._key.encrypt(em, 0)[0]
    c = ((bchr(0) * (k - len(m))) + m)
    return c
