MCPcopy
hub / github.com/jpadilla/pyjwt / force_bytes

Function force_bytes

jwt/utils.py:16–22  ·  view source on GitHub ↗
(value: Union[bytes, str])

Source from the content-addressed store, hash-verified

14
15
16def force_bytes(value: Union[bytes, str]) -> bytes:
17 if isinstance(value, str):
18 return value.encode("utf-8")
19 elif isinstance(value, bytes):
20 return value
21 else:
22 raise TypeError("Expected a string value")
23
24
25def base64url_decode(input: Union[bytes, str]) -> bytes:

Callers 8

prepare_keyMethod · 0.85
to_jwkMethod · 0.85
prepare_keyMethod · 0.85
prepare_keyMethod · 0.85
to_jwkMethod · 0.85
base64url_decodeFunction · 0.85
from_base64url_uintFunction · 0.85

Calls 1

encodeMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…