code: def raw_encrypt(self, plaintext, r_value=None):
          
          if not isinstance(plaintext, int):
              raise TypeError('Expected int type plaintext but got: %s' %
                              type(plaintext))
  
          if self.n - self.max_int <= plaintext < self.n:
              # Very large plaintext, take a sneaky shortcut using inverses
              neg_plaintext = self.n - plaintext  # = abs(plaintext - nsquare)
              neg_ciphertext = (self.n * neg_plaintext + 1) % self.nsquare
              nude_ciphertext = invert(neg_ciphertext, self.nsquare)
          else:
              # we chose g = n + 1, so that we can exploit the fact that
              # (n+1)^plaintext = n*plaintext + 1 mod n^2
              nude_ciphertext = (self.n * plaintext + 1) % self.nsquare
  
          r = r_value or self.get_random_lt_n()
          obfuscator = powmod(r, self.n, self.nsquare)
  
          return (nude_ciphertext * obfuscator) % self.nsquare
docs: Paillier encryption of a positive integer plaintext < :attr:`n`.
  
          You probably should be using :meth:`encrypt` instead, because it
          handles positive and negative ints and floats.
  
          Args:
            plaintext (int): a positive integer < :attr:`n` to be Paillier
              encrypted. Typically this is an encoding of the actual
              number you want to encrypt.
            r_value (int): obfuscator for the ciphertext; by default (i.e.
              r_value is None), a random value is used.
  
          Returns:
            int: Paillier encryption of plaintext.
  
          Raises:
            TypeError: if plaintext is not an int.