PageRenderTime 11ms CodeModel.GetById 7ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/libb64/cencode.h

http://github.com/nicolasff/webdis
C++ Header | 31 lines | 17 code | 8 blank | 6 comment | 0 complexity | dbb9e3b63aff79a936a7237fc3c8361e MD5 | raw file
 1/*
 2cencode.h - c header for a base64 encoding 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_CENCODE_H
 9#define BASE64_CENCODE_H
10
11typedef enum
12{
13	step_A, step_B, step_C
14} base64_encodestep;
15
16typedef struct
17{
18	base64_encodestep step;
19	char result;
20	int stepcount;
21} base64_encodestate;
22
23void base64_init_encodestate(base64_encodestate* state_in);
24
25char base64_encode_value(char value_in);
26
27int base64_encode_block(const char* plaintext_in, int length_in, char* code_out, base64_encodestate* state_in);
28
29int base64_encode_blockend(char* code_out, base64_encodestate* state_in);
30
31#endif /* BASE64_CENCODE_H */