示例#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']))
示例#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']))
示例#3
0
def decode_value(val):
    decoded = base64url_decode(ensure_bytes(val))
    return int_from_bytes(decoded, 'big')
示例#4
0
def decode_value(val):
    decoded = base64url_decode(ensure_bytes(val))
    return int_from_bytes(decoded, 'big')