MCPcopy
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
4def 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
11def decode_int(b):

Callers 2

signMethod · 0.85
_hmacMethod · 0.85

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…