Base64UrlEncoder
URL-safe Base64 encoder.
Methods
decode()
@classmethod
def decode(
data: bytes
) - > bytes
Decode the data from base64 encoded bytes to original bytes data.
Parameters
| Name | Type | Description |
|---|---|---|
| data | bytes | The URL-safe base64 encoded bytes to be converted back to their original form. |
Returns
| Type | Description |
|---|---|
bytes | The decoded data. |
encode()
@classmethod
def encode(
value: bytes
) - > bytes
Encode the data from bytes to a base64 encoded bytes.
Parameters
| Name | Type | Description |
|---|---|---|
| value | bytes | The raw bytes data to be encoded into a URL-safe base64 format. |
Returns
| Type | Description |
|---|---|
bytes | The encoded data. |
get_json_format()
@classmethod
def get_json_format() - > Literal['base64url']
Get the JSON format for the encoded data.
Returns
| Type | Description |
|---|---|
Literal['base64url'] | The JSON format for the encoded data. |