#NEWLINE# def __init__( self , pubkey = None , privkey = None , pubkey_x = None , pubkey_y = None , raw_privkey = None , curve = 'sect283r1' ) : #NEWLINE# #INDENT# '\n        For a normal and High level use, specifie pubkey,\n        privkey (if you need) and the curve\n        ' #NEWLINE# if ( type ( curve ) == str ) : #NEWLINE# #INDENT# self . curve = OpenSSL . get_curve ( curve ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . curve = curve #NEWLINE# #UNINDENT# if ( ( pubkey_x is not None ) and ( pubkey_y is not None ) ) : #NEWLINE# #INDENT# self . _set_keys ( pubkey_x , pubkey_y , raw_privkey ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( pubkey is not None ) : #NEWLINE# #INDENT# ( curve , pubkey_x , pubkey_y , i ) = ECC . _decode_pubkey ( pubkey ) #NEWLINE# if ( privkey is not None ) : #NEWLINE# #INDENT# ( curve2 , raw_privkey , i ) = ECC . _decode_privkey ( privkey ) #NEWLINE# if ( curve != curve2 ) : #NEWLINE# #INDENT# raise Exception ( 'Bad ECC keys ...' ) #NEWLINE# #UNINDENT# #UNINDENT# self . curve = curve #NEWLINE# self . _set_keys ( pubkey_x , pubkey_y , pubkey_x ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( self . privkey , self . pubkey_x , self . pubkey_y ) = self . _generate ( )