JOSE protocol implementation in Python with support for JSON Web Algorithms, Keys, and Signatures
73
Utility for encoding and decoding payloads using JOSE-style, URL-safe Base64 without padding.
b"hello" returns a URL-safe Base64 string with no = padding. @testencode_compact yields the original bytes even when padding is absent. @testValueError. @testValueError. @test@generates
def encode_compact(payload: bytes) -> str:
"""Convert bytes to a JOSE-compatible Base64 URL-safe string without padding."""
def decode_compact(data: str) -> bytes:
"""Return bytes from a JOSE Base64 string, accepting missing padding and rejecting invalid characters."""
def encode_ascii_text(text: str) -> str:
"""Accept ASCII-only text, encode to bytes using ASCII, then return its JOSE Base64 representation."""Provides JOSE Base64 helpers for URL-safe encoding/decoding without padding.
Install with Tessl CLI
npx tessl i tessl/pypi-josepyevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10