#include <mcs.hh>
For an example on how to use this class see the b64codec.cc file.
Definition at line 7997 of file mcs.hh.
Public Member Functions | |
B64_Codec () | |
Constructor. | |
char * | buffer () |
unsigned int | bufUsed () |
unsigned int | decode (char *buf_in, int Length, char *par_buf_out=NULL) |
Decode a block of data. | |
unsigned int | encode (char *buf_in, int Length, char *par_buf_out=NULL, unsigned int linesize=72) |
Encode a block of data. | |
~B64_Codec () | |
Destructor. | |
Private Member Functions | |
void | decodeblock (unsigned char in[4], unsigned char out[3]) |
Decode a block of 4'Base64' bytes into 3 binary bytes. | |
void | encodeblock (unsigned char in[3], unsigned char out[4], int len) |
Encode a block of 3 binary bytes into 4 'Base64' bytes. | |
bool | eob () |
Tell if we are at the end of input buffer. | |
void | freeBuffer () |
Free internal buffer. | |
unsigned char | readData () |
Read one byte from input buffer. | |
void | requireSpace (unsigned int Length) |
Allocate "Length" bytes in internal buffer. | |
void | writeData (unsigned char d) |
Write one byte to output buffer. | |
Private Attributes | |
unsigned int | blocksout |
Blocks of base64 data already written. | |
char * | buf_out |
Pointer to output buffer. | |
char * | bufAllocated |
Pointer to allocated internal buffer. | |
unsigned int | bufsize |
Size of allocated buffer. | |
unsigned int | bufused |
Size of data in output buffer. | |
char * | EOIB |
Pointer to the end of input buffer. | |
unsigned int | linesize |
Required linesize (when encoding). | |
char * | pin |
Cursor for input buffer. | |
char * | pout |
Cursor for output buffer. | |
unsigned char | precData [4] |
int | precDataCount |
Static Private Attributes | |
static const char * | cb64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
static const char * | cd64 = "|$$$}rstuvwxyz{$$$$$$$>?@ABCDEFGHIJKLMNOPQRSTUVW$$$$$$XYZ[\\]^_`abcdefghijklmnopq" |
unsigned int mcs::B64_Codec::decode | ( | char * | buf_in, | |
int | Length, | |||
char * | par_buf_out = NULL | |||
) |
void mcs::B64_Codec::decodeblock | ( | unsigned char | in[4], | |
unsigned char | out[3] | |||
) | [private] |
unsigned int mcs::B64_Codec::encode | ( | char * | buf_in, | |
int | Length, | |||
char * | par_buf_out = NULL , |
|||
unsigned int | linesize = 72 | |||
) |
void mcs::B64_Codec::encodeblock | ( | unsigned char | in[3], | |
unsigned char | out[4], | |||
int | len | |||
) | [private] |
bool mcs::B64_Codec::eob | ( | ) | [private] |
void mcs::B64_Codec::freeBuffer | ( | ) | [private] |
unsigned char mcs::B64_Codec::readData | ( | ) | [private] |
void mcs::B64_Codec::requireSpace | ( | unsigned int | Length | ) | [private] |
void mcs::B64_Codec::writeData | ( | unsigned char | d | ) | [private] |
unsigned int mcs::B64_Codec::blocksout [private] |
char* mcs::B64_Codec::buf_out [private] |
char* mcs::B64_Codec::bufAllocated [private] |
unsigned int mcs::B64_Codec::bufsize [private] |
unsigned int mcs::B64_Codec::bufused [private] |
char* mcs::B64_Codec::EOIB [private] |
unsigned int mcs::B64_Codec::linesize [private] |
char* mcs::B64_Codec::pin [private] |
char* mcs::B64_Codec::pout [private] |
![]() |
MCS (My Customizable Server) ver. 0.3.3-alpha3
|