def createRC4(key, IV, implList=None):
 if (implList == None):
  implList = ['cryptlib', 'openssl', 'pycrypto', 'python']
 if (len(IV) != 0):
  raise AssertionError()
 for impl in implList:
  if ((impl == 'cryptlib') and cryptomath.cryptlibpyLoaded):
   return Cryptlib_RC4.new(key)
  elif ((impl == 'openssl') and cryptomath.m2cryptoLoaded):
   return OpenSSL_RC4.new(key)
  elif ((impl == 'pycrypto') and cryptomath.pycryptoLoaded):
   return PyCrypto_RC4.new(key)
  elif (impl == 'python'):
   return Python_RC4.new(key)
 raise NotImplementedError()

def createRC4 ( key , IV , implList = None ) : if ( implList == None ) : implList = [ 'cryptlib' , 'openssl' , 'pycrypto' , 'python' ] if ( len ( IV ) != 0 ) : raise AssertionError ( ) for impl in implList : if ( ( impl == 'cryptlib' ) and cryptomath . cryptlibpyLoaded ) : return Cryptlib_RC4 . new ( key ) elif ( ( impl == 'openssl' ) and cryptomath . m2cryptoLoaded ) : return OpenSSL_RC4 . new ( key ) elif ( ( impl == 'pycrypto' ) and cryptomath . pycryptoLoaded ) : return PyCrypto_RC4 . new ( key ) elif ( impl == 'python' ) : return Python_RC4 . new ( key ) raise NotImplementedError ( )
create a new rc4 object .