def _create_eax_cipher(factory, **kwargs):
 try:
  key = kwargs.pop('key')
  nonce = kwargs.pop('nonce', None)
  if (nonce is None):
   nonce = get_random_bytes(16)
  mac_len = kwargs.pop('mac_len', factory.block_size)
 except KeyError as e:
  raise TypeError(('Missing parameter: ' + str(e)))
 return EaxMode(factory, key, nonce, mac_len, kwargs)

def _create_eax_cipher ( factory , ** kwargs ) : try : key = kwargs . pop ( 'key' ) nonce = kwargs . pop ( 'nonce' , None ) if ( nonce is None ) : nonce = get_random_bytes ( 16 ) mac_len = kwargs . pop ( 'mac_len' , factory . block_size ) except KeyError as e : raise TypeError ( ( 'Missing parameter: ' + str ( e ) ) ) return EaxMode ( factory , key , nonce , mac_len , kwargs )
create a new block cipher .