(self, key)
self.alpha and self.beta are str-typed binaries, e.g., '1010'
        :param key: bytes
self.alpha and self.beta are str-typed binaries, e.g., '1010'
        :param key: bytes
self . alpha and self . beta are str - typed binaries e . g . 1010 : param key : bytes
def __init__(self, key):
        """
        self.alpha and self.beta are str-typed binaries, e.g., '1010'
        :param key: bytes
        """
        super(XorCipherKey, self).__init__()
        self.alpha = conversion.bytes_to_bin(key[:(len(key) // 2)])     # binary string
        self.beta = conversion.bytes_to_bin(key[(len(key) // 2):])      # binary string
        if len(self.beta) % 8 != 0:
            raise ValueError("XOR encryption invalid key")
        self.beta_string = conversion.bin_to_str(self.beta)
def __init__ ( self , key ) : super ( XorCipherKey , self ) . __init__ ( ) self . alpha = conversion . bytes_to_bin ( key [ : ( len ( key ) // 2 ) ] ) # binary string self . beta = conversion . bytes_to_bin ( key [ ( len ( key ) // 2 ) : ] ) # binary string if len ( self . beta ) % 8 != 0 : raise ValueError ( "XOR encryption invalid key" ) self . beta_string = conversion . bin_to_str ( self . beta )