def createAES(key, IV, implList=None):
 if (implList == None):
  implList = ['cryptlib', 'openssl', 'pycrypto', 'python']
 for impl in implList:
  if ((impl == 'cryptlib') and cryptomath.cryptlibpyLoaded):
   return Cryptlib_AES.new(key, 2, IV)
  elif ((impl == 'openssl') and cryptomath.m2cryptoLoaded):
   return OpenSSL_AES.new(key, 2, IV)
  elif ((impl == 'pycrypto') and cryptomath.pycryptoLoaded):
   return PyCrypto_AES.new(key, 2, IV)
  elif (impl == 'python'):
   return Python_AES.new(key, 2, IV)
 raise NotImplementedError()

def createAES ( key , IV , implList = None ) : if ( implList == None ) : implList = [ 'cryptlib' , 'openssl' , 'pycrypto' , 'python' ] for impl in implList : if ( ( impl == 'cryptlib' ) and cryptomath . cryptlibpyLoaded ) : return Cryptlib_AES . new ( key , 2 , IV ) elif ( ( impl == 'openssl' ) and cryptomath . m2cryptoLoaded ) : return OpenSSL_AES . new ( key , 2 , IV ) elif ( ( impl == 'pycrypto' ) and cryptomath . pycryptoLoaded ) : return PyCrypto_AES . new ( key , 2 , IV ) elif ( impl == 'python' ) : return Python_AES . new ( key , 2 , IV ) raise NotImplementedError ( )
create a new aes object .