'Produce the PKCS#1 v1.5 encryption of a message.
This function is named ``RSAES-PKCS1-V1_5-ENCRYPT``, and is specified in
section 7.2.1 of RFC3447.
For a complete example see `Crypto.Cipher.PKCS1_v1_5`.
:Parameters:
message : byte 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 11.
:Return: A byte 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)
    mLen = len(message)
    if (mLen > (k - 11)):
        raise ValueError('Plaintext    is    too    long.')
    class nonZeroRandByte:
        def __init__(self, rf):
            self.rf = rf
        def __call__(self, c):
            while (bord(c) == 0):
                c = self.rf(1)[0]
            return c
    ps = tobytes(map(nonZeroRandByte(randFunc), randFunc(((k - mLen) - 3))))
    em = (((b('\x00\x02') + ps) + bchr(0)) + message)
    m = self._key.encrypt(em, 0)[0]
    c = ((bchr(0) * (k - len(m))) + m)
    return c
