arduino-emulator
Loading...
Searching...
No Matches
cdecode.h
1/*
2cdecode.h - c header for a base64 decoding algorithm
3
4This is part of the libb64 project, and has been placed in the public domain.
5For details, see http://sourceforge.net/projects/libb64
6*/
7
8#ifndef BASE64_CDECODE_H
9#define BASE64_CDECODE_H
10
11#define base64_decode_expected_len(n) ((n * 3) / 4)
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17typedef enum {
18 step_a, step_b, step_c, step_d
19} base64_decodestep;
20
21typedef struct {
22 base64_decodestep step;
23 char plainchar;
25
26void base64_init_decodestate(base64_decodestate* state_in);
27
28int base64_decode_value(char value_in);
29
30int base64_decode_block(const char* code_in, const int length_in, char* plaintext_out, base64_decodestate* state_in);
31
32int base64_decode_chars(const char* code_in, const int length_in, char* plaintext_out);
33
34#ifdef __cplusplus
35} // extern "C"
36#endif
37
38#endif /* BASE64_CDECODE_H */
Definition cdecode.h:21