This group contains support functions for base64 and base64url encoding and decoding.
More...
|
enum | Base64_Decode_state { BASE64_DECODE_STATE_0
, BASE64_DECODE_STATE_1
, BASE64_DECODE_STATE_2
, BASE64_DECODE_STATE_3
} |
| Represents the base64 and base64url decoder state.
|
|
enum | Base64_Decode_status { BASE64_DECODE_SUCCESS
, BASE64_DECODE_OVERFLOW
, BASE64_DECODE_INVALID_INPUT
} |
| Represents the base64 and base64url decoder status.
|
|
|
int | _Base64_Encode (IO_Put_char put_char, void *arg, const void *src, size_t len, const char *wordbreak, int wordlen) |
| Outputs the source buffer in base64 encoding.
|
|
int | _Base64url_Encode (IO_Put_char put_char, void *arg, const void *src, size_t len, const char *wordbreak, int wordlen) |
| Outputs the source buffer in base64url encoding.
|
|
void | _Base64_Decode_initialize (Base64_Decode_control *self, uint8_t *target, size_t target_size) |
| Initializes the base64 decoder.
|
|
Base64_Decode_status | _Base64_Decode (Base64_Decode_control *self, char ch) |
| Decodes the character.
|
|
|
const uint8_t | _Base64_Encoding [64] |
| Maps a 6-bit integer to the corresponding base64 encoding.
|
|
const uint8_t | _Base64url_Encoding [64] |
| Maps a 6-bit integer to the corresponding base64url encoding.
|
|
const uint8_t | _Base64_Decoding [128] |
| Maps a 7-bit character to the associated 6-bit integer as defined by the base64 or base64url encoding or a special value.
|
|
This group contains support functions for base64 and base64url encoding and decoding.
◆ _Base64_Decode()
Decodes the character.
The decoder accepts base64 and base64url encodings. White space is ignored.
- Parameters
-
[in,out] | self | is the base64 decoder control. |
| ch | is the character to decode. |
◆ _Base64_Decode_initialize()
Initializes the base64 decoder.
- Parameters
-
[out] | self | is the base64 decoder control to initialize. |
[out] | target | is the base address of the target area for decoding. |
| target_size | is the size in bytes of the target area for decoding. |
◆ _Base64_Encode()
int _Base64_Encode |
( |
IO_Put_char |
put_char, |
|
|
void * |
arg, |
|
|
const void * |
src, |
|
|
size_t |
len, |
|
|
const char * |
wordbreak, |
|
|
int |
wordlen |
|
) |
| |
Outputs the source buffer in base64 encoding.
After word length of output characters produced by the encoding a word break is produced.
- Parameters
-
put_char | is the put character function used to output the encoded source buffer. |
arg | is the argument passed to the put character function. |
src | is the pointer to the source buffer begin. |
srclen | is the length of the source buffer in bytes. |
wordbreak | is the word break string. |
wordlen | is the word length in bytes. If the word length is less than four, then a word length of four will be used. |
- Returns
- Returns the count of output characters.
◆ _Base64url_Encode()
int _Base64url_Encode |
( |
IO_Put_char |
put_char, |
|
|
void * |
arg, |
|
|
const void * |
src, |
|
|
size_t |
len, |
|
|
const char * |
wordbreak, |
|
|
int |
wordlen |
|
) |
| |
Outputs the source buffer in base64url encoding.
After word length of output characters produced by the encoding a word break is produced.
- Parameters
-
put_char | is the put character function used to output the encoded source buffer. |
arg | is the argument passed to the put character function. |
src | is the pointer to the source buffer begin. |
srclen | is the length of the source buffer in bytes. |
wordbreak | is the word break string. |
wordlen | is the word length in bytes. If the word length is less than four, then a word length of four will be used. |
- Returns
- Returns the count of output characters.