00001 /* 00002 cdecode.h - c header for a base64 decoding algorithm 00003 00004 This is part of the libb64 project, and has been placed in the public domain. 00005 For details, see http://sourceforge.net/projects/libb64 00006 */ 00007 00008 #ifndef BASE64_CDECODE_H 00009 #define BASE64_CDECODE_H 00010 00011 typedef enum 00012 { 00013 step_a, step_b, step_c, step_d 00014 } base64_decodestep; 00015 00016 typedef struct 00017 { 00018 base64_decodestep step; 00019 char plainchar; 00020 } base64_decodestate; 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00026 void base64_init_decodestate(base64_decodestate* state_in); 00027 00028 int base64_decode_value(char value_in); 00029 00030 int base64_decode_block(const char* code_in, const int length_in, char* plaintext_out, base64_decodestate* state_in); 00031 00032 #ifdef __cplusplus 00033 } 00034 #endif 00035 #endif /* BASE64_CDECODE_H */