Base64Encoder
Standard (non-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 base64 encoded byte sequence to be decoded back into its 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 byte data to be converted into a base64 encoded byte string. |
Returns
| Type | Description |
|---|---|
bytes | The encoded data. |
get_json_format()
@classmethod
def get_json_format() - > Literal['base64']
Get the JSON format for the encoded data.
Returns
| Type | Description |
|---|---|
Literal['base64'] | The JSON format for the encoded data. |