![]() |
RTEMS 6.3
|
This group contains support functions for base64 and base64url encoding and decoding. More...
Files | |
| file | cpukit/base64/base64-decode.c |
| This source file contains the implementation of _Base64_Decode_initialize() and _Base64_Decode(). | |
| file | cpukit/base64/base64-encode.c |
| This source file contains the implementation of _Base64_Encode() and _Base64url_Encode(). | |
| file | cpukit/include/rtems/base64.h |
| This header file provides the interfaces of the Base64 Encoding and Decoding. | |
Data Structures | |
| struct | Base64_Decode_control |
| Contains the base64 and base64url decoder control. More... | |
Enumerations | |
| 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. | |
Functions | |
| 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. | |
This group contains support functions for base64 and base64url encoding and decoding.
| Base64_Decode_status _Base64_Decode | ( | Base64_Decode_control * | self, |
| char | ch ) |
Decodes the character.
The decoder accepts base64 and base64url encodings. White space is ignored.
| [in,out] | self | is the base64 decoder control. |
| ch | is the character to decode. |
| void _Base64_Decode_initialize | ( | Base64_Decode_control * | self, |
| uint8_t * | target, | ||
| size_t | target_size ) |
Initializes the base64 decoder.
| [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. |
| 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.
| 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. |
| 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.
| 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. |