code: def encrypt_with_import_key(self, plain):
          
  
          n, e = TemplateProcessor.read_serialized_rsa_pub_key(self.import_key['key'])
          n_bit_size = long_bit_size(n)
          bs = 0
          if n_bit_size > 1024-10 and n_bit_size < 1024+10:
              bs = 128
          elif n_bit_size > 2048-10 and n_bit_size < 2048+10:
              bs = 256
          else:
              raise CryptoError('Unknown RSA modulus size: %d', n_bit_size)
  
          padded = PKCS15.pad(plain, bs=bs, bt=2)
          return rsa_enc(padded, n, e)
docs: Encrypts plain buffer with the import key
          :param plain:
          :return: