Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
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
49
def
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
55
def
int_to_base64(num):
Callers
9
load_private_key
Method · 0.90
load_public_key
Method · 0.90
load_private_key
Method · 0.90
load_public_key
Method · 0.90
test_rsa_public_key
Function · 0.90
test_rsa_private_key
Function · 0.90
test_rsa_private_key2
Function · 0.90
test_ec_public_key
Function · 0.90
test_ec_private_key
Function · 0.90
Calls
2
urlsafe_b64decode
Function · 0.85
to_bytes
Function · 0.85
Tested by
5
test_rsa_public_key
Function · 0.72
test_rsa_private_key
Function · 0.72
test_rsa_private_key2
Function · 0.72
test_ec_public_key
Function · 0.72
test_ec_private_key
Function · 0.72