(self, plaintext)
return XorCiphertext(ciphertext, self.beta_string[:len(ciphertext)])
:param plaintext: int/float/str
        :return: XorCiphertext
def encrypt(self, plaintext):
        """

        :param plaintext: int/float/str
        :return: XorCiphertext
        """
        plaintext_bin = self._all_to_bin(plaintext)
        if plaintext_bin == -1:
            raise TypeError('Xor encryption only supports int/float/str plaintext')
        ciphertext_bin = self._xor(plaintext_bin, self.alpha)
        ciphertext = self._bin_to_str(ciphertext_bin)
        return XorCiphertext(ciphertext, self.beta_string[:len(ciphertext)])
def encrypt ( self , plaintext ) : plaintext_bin = self . _all_to_bin ( plaintext ) if plaintext_bin == - 1 : raise TypeError ( 'Xor encryption only supports int/float/str plaintext' ) ciphertext_bin = self . _xor ( plaintext_bin , self . alpha ) ciphertext = self . _bin_to_str ( ciphertext_bin ) return XorCiphertext ( ciphertext , self . beta_string [ : len ( ciphertext ) ] )