def compute_signature(message, secret):
 digest_maker = hmac.new(secret, '', hashlib.sha256)
 for (name, value) in utils.recursive_keypairs(message):
  if (name == 'message_signature'):
   continue
  digest_maker.update(name)
  digest_maker.update(unicode(value).encode('utf-8'))
 return digest_maker.hexdigest()

def compute_signature ( message , secret ) : digest_maker = hmac . new ( secret , '' , hashlib . sha256 ) for ( name , value ) in utils . recursive_keypairs ( message ) : if ( name == 'message_signature' ) : continue digest_maker . update ( name ) digest_maker . update ( unicode ( value ) . encode ( 'utf-8' ) ) return digest_maker . hexdigest ( )
return the signature for a message dictionary .