blob: f53f1adb69fc5ad4496a281eb192f311fd02b36b [file] [log] [blame]
Alexandre Lision7fd5d3d2013-12-04 13:06:40 -05001/*
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#include <stdint.h>
12
13#if defined(__cplusplus)
14extern "C"
15{
16#endif
17
18typedef enum
19{
20 step_a, step_b, step_c, step_d
21} base64_decodestep;
22
23typedef struct
24{
25 base64_decodestep step;
26 char plainchar;
27} base64_decodestate;
28
29void base64_init_decodestate(base64_decodestate* state_in);
30
31int base64_decode_value(char value_in);
32
33int base64_decode_block(const char* code_in, const int length_in, uint8_t *plaintext_out, base64_decodestate* state_in);
34
35#if defined(__cplusplus)
36}
37#endif
38
39#endif /* BASE64_CDECODE_H */