Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/authlib/authlib
/ encode_int
Function
encode_int
authlib/jose/rfc7518/util.py:4–8 ·
view source on GitHub ↗
(num, bits)
Source
from the content-addressed store, hash-verified
2
3
4
def
encode_int(num, bits):
5
length = ((bits + 7) // 8) * 2
6
padded_hex = f
"{num:0{length}x}"
7
big_endian = binascii.a2b_hex(padded_hex.encode(
"ascii"
))
8
return
big_endian
9
10
11
def
decode_int(b):
Callers
2
sign
Method · 0.85
_hmac
Method · 0.85
Calls
1
encode
Method · 0.80
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…