(self, key, nonce=None)
:param key: bytes, must be 16, 24 or 32 bytes long
def __init__(self, key, nonce=None):
        """

        :param key: bytes, must be 16, 24 or 32 bytes long
        """
        super(AESKey, self).__init__()
        if nonce is None:
            self.cipher_core = AES.new(key, AES.MODE_EAX)
            self.nonce = self.cipher_core.nonce # noise, generated by the encryptor, must be provided to the decryptor
        else:
            self.cipher_core = AES.new(key, AES.MODE_EAX, nonce=nonce)
            self.nonce = nonce
def __init__ ( self , key , nonce = None ) : super ( AESKey , self ) . __init__ ( ) if nonce is None : self . cipher_core = AES . new ( key , AES . MODE_EAX ) self . nonce = self . cipher_core . nonce # noise, generated by the encryptor, must be provided to the decryptor else : self . cipher_core = AES . new ( key , AES . MODE_EAX , nonce = nonce ) self . nonce = nonce