def make_poisoning_report_mac(poisoner_canary, poisoner_name, poisoner_id, cache_policy, source, route_name):
 mac_key = g.secrets['cache_poisoning']
 mac_data = (poisoner_canary, poisoner_name, str(poisoner_id), cache_policy, source, route_name)
 return hmac.new(mac_key, '|'.join(mac_data), hashlib.sha1).hexdigest()

def make_poisoning_report_mac ( poisoner_canary , poisoner_name , poisoner_id , cache_policy , source , route_name ) : mac_key = g . secrets [ 'cache_poisoning' ] mac_data = ( poisoner_canary , poisoner_name , str ( poisoner_id ) , cache_policy , source , route_name ) return hmac . new ( mac_key , '|' . join ( mac_data ) , hashlib . sha1 ) . hexdigest ( )
make a mac to send with cache poisoning reports for this page .