MCPcopy Index your code
hub / github.com/authlib/authlib / base64_to_int

Function base64_to_int

authlib/common/encoding.py:49–52  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

47
48
49def base64_to_int(s):
50 data = urlsafe_b64decode(to_bytes(s, charset="ascii"))
51 buf = struct.unpack(f"{len(data)}B", data)
52 return int("".join([f"{byte:02x}" for byte in buf]), 16)
53
54
55def int_to_base64(num):

Callers 9

load_private_keyMethod · 0.90
load_public_keyMethod · 0.90
load_private_keyMethod · 0.90
load_public_keyMethod · 0.90
test_rsa_public_keyFunction · 0.90
test_rsa_private_keyFunction · 0.90
test_rsa_private_key2Function · 0.90
test_ec_public_keyFunction · 0.90
test_ec_private_keyFunction · 0.90

Calls 2

urlsafe_b64decodeFunction · 0.85
to_bytesFunction · 0.85

Tested by 5

test_rsa_public_keyFunction · 0.72
test_rsa_private_keyFunction · 0.72
test_rsa_private_key2Function · 0.72
test_ec_public_keyFunction · 0.72
test_ec_private_keyFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…