Base64 Decoder API
#include "src/btstack_base64_decoder.h"
#define BTSTACK_BASE64_DECODER_MORE -1
#define BTSTACK_BASE64_DECODER_COMPLETE -2
#define BTSTACK_BASE64_DECODER_INVALID -3
#define BTSTACK_BASE64_DECODER_FULL -4
btstack_base64_decoder_init
void btstack_base64_decoder_init(btstack_base64_decoder_t * context);
Initialize base64 decoder
Parameters
- context
btstack_base64_decoder_process_byte
int btstack_base64_decoder_process_byte(btstack_base64_decoder_t * context, uint8_t c);
Decode single byte
context
Returns
- int: value, or BTSTACK_BASE64_DECODER_MORE, BTSTACK_BASE64_DECODER_COMPLETE, BTSTACK_BASE64_DECODER_INVALID
btstack_base64_decoder_process_block
int btstack_base64_decoder_process_block(const uint8_t * input_data, uint32_t input_size, uint8_t * output_buffer, uint32_t output_max_size);
Decode block
input_data base64 encoded message
input_size
@breif: output_buffer
output_max_size
Returns
- int: output_size or BTSTACK_BASE64_DECODER_INVALID, BTSTACK_BASE64_DECODER_FULL