#NEWLINE# def get_signature( params , nonce , secret = None ) : #NEWLINE# #INDENT# params = '' . join ( ( frappe . utils . cstr ( p ) for p in params . values ( ) ) ) #NEWLINE# if ( not secret ) : #NEWLINE# #INDENT# secret = ( frappe . local . conf . get ( 'secret' ) or 'secret' ) #NEWLINE# #UNINDENT# signature = hmac . new ( str ( signature ) ) #NEWLINE# signature . update ( secret ) #NEWLINE# signature . update ( params ) #NEWLINE# return signature . hexdigest ( )