def verify_signatures(params, signed_fields_key='signedFields', full_sig_key='signedDataPublicSignature'):
 signed_fields = params.get(signed_fields_key, '').split(',')
 data = u','.join([u'{0}={1}'.format(k, params.get(k, '')) for k in signed_fields])
 signed_fields_sig = processor_hash(params.get(signed_fields_key, ''))
 data += (u',signedFieldsPublicSignature=' + signed_fields_sig)
 returned_sig = params.get(full_sig_key, '')
 if (processor_hash(data) != returned_sig):
  raise CCProcessorSignatureException()

def verify_signatures ( params , signed_fields_key = 'signedFields' , full_sig_key = 'signedDataPublicSignature' ) : signed_fields = params . get ( signed_fields_key , '' ) . split ( ',' ) data = u',' . join ( [ u'{0}={1}' . format ( k , params . get ( k , '' ) ) for k in signed_fields ] ) signed_fields_sig = processor_hash ( params . get ( signed_fields_key , '' ) ) data += ( u',signedFieldsPublicSignature=' + signed_fields_sig ) returned_sig = params . get ( full_sig_key , '' ) if ( processor_hash ( data ) != returned_sig ) : raise CCProcessorSignatureException ( )
verify the signatures accompanying the post back from cybersource hosted order page returns silently if verified raises ccprocessorsignatureexception if not verified .