Example #1
0
def load_hmac_key():
    with open(os.path.join(BASE_PATH, 'jwk_hmac.json'), 'r') as infile:
        keyobj = json.load(infile)

    return base64url_decode(ensure_bytes(keyobj['k']))
Example #2
0
def load_hmac_key():
    with open(os.path.join(BASE_PATH, 'jwk_hmac.json'), 'r') as infile:
        keyobj = json.load(infile)

    return base64url_decode(ensure_bytes(keyobj['k']))
Example #3
0
def decode_value(val):
    decoded = base64url_decode(ensure_bytes(val))
    return int_from_bytes(decoded, 'big')
Example #4
0
def decode_value(val):
    decoded = base64url_decode(ensure_bytes(val))
    return int_from_bytes(decoded, 'big')