Imported Upstream version 1.0beta3
[platform/upstream/syncevolution.git] / src / synthesis / src / sysync_SDK / Sources / sysync_b64.h
1 /* b64 encoding/decoding */
2
3 #ifndef SYSYNC_B64_H
4 #define SYSYNC_B64_H
5
6 #include "generic_types.h"
7
8 using namespace sysync;
9
10 namespace b64 {
11
12 // encode data to B64, returns allocated buffer
13 // does line breaks if maxLineLen!=0
14 char *encode (
15   const uInt8 *instr, uInt32 len, uInt32 *outlenP=NULL,
16   sInt16 maxLineLen=0, bool crLineEnd=false
17 );
18
19 // decode B64 string to data (len=0 calculates string length automatically)
20 uInt8 *decode(const char *instr, uInt32 len=0, uInt32 *outlenP=NULL);
21
22 // free memory allocated with encode or decode above
23 void free(void *mem);
24
25 }
26
27 #endif /* SYSYNC_B64_H */
28
29 /* eof */