#NEWLINE# def _createPublicRSAKey( n , e , implementations = [ 'openssl' , 'pycrypto' , 'python' ] ) : #NEWLINE# #INDENT# for implementation in implementations : #NEWLINE# #INDENT# if ( ( implementation == 'openssl' ) and cryptomath . m2cryptoLoaded ) : #NEWLINE# #INDENT# return OpenSSL_RSAKey ( n , e ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( implementation == 'pycrypto' ) and cryptomath . pycryptoLoaded ) : #NEWLINE# #INDENT# return PyCrypto_RSAKey ( n , e ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( implementation == 'python' ) : #NEWLINE# #INDENT# return Python_RSAKey ( n , e ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# raise ValueError ( 'No acceptable implementations' )