1 /*
2 cencode.h - c header for a base64 encoding algorithm
3 
4 This is part of the libb64 project, and has been placed in the public domain.
5 For details, see http://sourceforge.net/projects/libb64
6 */
7 
8 #ifndef BASE64_CENCODE_H
9 #define BASE64_CENCODE_H
10 
11 typedef enum
12 {
13 step_A, step_B, step_C
14 } base64_encodestep;
15 
16 
17 typedef struct
18 {
19 
20 base64_encodestep step;
21 
22 char result;
23 
24 int stepcount;
25 
26 } base64_encodestate;
27 
28 
29 void base64_init_encodestate (base64_encodestate * state_in);
30 
31 
32 char base64_encode_value (char value_in);
33 
34 
35 int base64_encode_block (const char *plaintext_in, int length_in,
36 			    char *code_out, base64_encodestate * state_in);
37 
38 
39 int base64_encode_blockend (char *code_out, base64_encodestate * state_in);
40 
41 
42 #endif	/* BASE64_CENCODE_H */
43 
44