<commit_before>import hmac
import base64
import os
import urllib
import collections

from flask import request, abort

__KEY = os.urandom(33)


def validate_request_authentication():
    message = b"test"
    if (request.args['signature'].replace(' ', '+') != make_b64_digest(message).decode('ascii')):
        abort(403)


def make_url(host, ihost):<commit_msg>Parse HEX parameter for HMAC auth<commit_after>import hmac
import base64
import binascii
import os
import urllib
import collections

from flask import request, abort

__KEY = os.urandom(33)


def validate_request_authentication():
    message = b"test"
    unhexed = binascii.unhexlify(request.args['signature'])
    if (base64.b64encode(unhexed) != make_b64_digest(message)):
        abort(403)


def make_url(host, ihost):
{'fraction_non_alphanumeric': 0.10814249363867684, 'fraction_numerical': 0.027989821882951654, 'mean_word_length': 5.10077519379845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7122362', 'n_tokens_mistral': 275, 'n_tokens_neox': 252, 'n_words': 64}