'Encrypt the passed-in bytes.
This performs PKCS1 encryption of the passed-in data.
@type bytes: L{bytearray} of unsigned bytes
@param bytes: The value which will be encrypted.
@rtype: L{bytearray} of unsigned bytes.
@return: A PKCS1 encryption of the passed-in data.'

def encrypt(self, bytes):

    paddedBytes = self._addPKCS1Padding(bytes, 2)
    m = bytesToNumber(paddedBytes)
    if (m >= self.n):
        raise ValueError()
    c = self._rawPublicKeyOp(m)
    encBytes = numberToByteArray(c, numBytes(self.n))
    return encBytes
