Ejemplo n.º 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']))
Ejemplo n.º 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']))
Ejemplo n.º 3
0
def decode_value(val):
    decoded = base64url_decode(ensure_bytes(val))
    return int_from_bytes(decoded, 'big')
Ejemplo n.º 4
0
def decode_value(val):
    decoded = base64url_decode(ensure_bytes(val))
    return int_from_bytes(decoded, 'big')