#include <Base64Buffer.h>
TSP-enforcing: No
Definition at line 21 of file Base64Buffer.h.
Public Member Functions | |
CBase64Buffer () | |
virtual | ~CBase64Buffer () |
bool | decode (const char *in, const unsigned long inLen, unsigned char *out, unsigned long *outLen) |
bool | encode (const unsigned char *in, const unsigned long inLen, char *out, unsigned long *outLen) |
void | addLineBreaks (int addLineBreaksAt, bool addCarriageReturn=true) |
bool | prependChars (const char *sz) |
Protected Attributes | |
int | m_addLineBreaks |
char * | m_prependChars |
bool | m_addCR |
Static Protected Attributes | |
static unsigned char | m_base64chars [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
static unsigned int | m_bitMask [] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 } |
static int | m_decodeTable [] |
CBase64Buffer::CBase64Buffer | ( | ) |
Interface: External
Constructor for CBase64Buffer class
Definition at line 39 of file Base64Buffer.cpp.
References m_addCR, m_addLineBreaks, m_base64chars, m_decodeTable, and m_prependChars.
CBase64Buffer::~CBase64Buffer | ( | ) | [virtual] |
Interface: External
Destructor for CBase64Buffer class
Definition at line 66 of file Base64Buffer.cpp.
References m_prependChars.
bool CBase64Buffer::decode | ( | const char * | in, | |
const unsigned long | inLen, | |||
unsigned char * | out, | |||
unsigned long * | outLen | |||
) |
Interface: External
This function decodes base 64 buffer.
The size of the output buffer must not be less than 3/4 the size of the input buffer.
Definition at line 241 of file Base64Buffer.cpp.
References c, COMMON_INVALID_INPUT, m_decodeTable, and TOOLKIT_PATH.
Referenced by B64Decode().
bool CBase64Buffer::encode | ( | const unsigned char * | in, | |
const unsigned long | inLen, | |||
char * | out, | |||
unsigned long * | outLen | |||
) |
Interface: External
This function ecodes into base 64
Definition at line 78 of file Base64Buffer.cpp.
References COMMON_INVALID_INPUT, m_addCR, m_addLineBreaks, m_base64chars, m_bitMask, m_prependChars, and TOOLKIT_PATH.
Referenced by B64Encode().
void CBase64Buffer::addLineBreaks | ( | int | addLineBreaks, | |
bool | addCarriageReturn = true | |||
) |
Interface: External
This this helper function addes line breaks.
Definition at line 311 of file Base64Buffer.cpp.
References m_addCR, and m_addLineBreaks.
bool CBase64Buffer::prependChars | ( | const char * | sz | ) |
Interface: External
This this helper function prepends Characters
Definition at line 335 of file Base64Buffer.cpp.
References m_prependChars.
int CBase64Buffer::m_addLineBreaks [protected] |
Definition at line 34 of file Base64Buffer.h.
Referenced by addLineBreaks(), CBase64Buffer(), and encode().
char* CBase64Buffer::m_prependChars [protected] |
Definition at line 35 of file Base64Buffer.h.
Referenced by CBase64Buffer(), encode(), prependChars(), and ~CBase64Buffer().
bool CBase64Buffer::m_addCR [protected] |
Definition at line 36 of file Base64Buffer.h.
Referenced by addLineBreaks(), CBase64Buffer(), and encode().
unsigned char CBase64Buffer::m_base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [static, protected] |
unsigned int CBase64Buffer::m_bitMask = { 0, 1, 3, 7, 15, 31, 63, 127, 255 } [static, protected] |
int CBase64Buffer::m_decodeTable [static, protected] |