|
Yate
|
Base64 encoder/decoder class. More...
#include <yateclass.h>
Public Member Functions | |
| Base64 () | |
| Base64 (void *src, unsigned int len, bool copyData=true) | |
| void | encode (String &dest, unsigned int lineLen=0, bool lineAtEnd=false) |
| bool | decode (DataBlock &dest, bool liberal=true) |
| Base64 & | operator<< (const String &value) |
| Base64 & | operator<< (const DataBlock &data) |
| Base64 & | operator<< (const char *value) |
Public Member Functions inherited from DataBlock | |
| DataBlock (unsigned int overAlloc=0) | |
| DataBlock (const DataBlock &value) | |
| DataBlock (const DataBlock &value, unsigned int overAlloc) | |
| DataBlock (void *value, unsigned int len, bool copyData=true, unsigned int overAlloc=0) | |
| virtual | ~DataBlock () |
| virtual void * | getObject (const String &name) const |
| void * | data () const |
| unsigned char * | data (unsigned int offs, unsigned int len=1) const |
| int | at (unsigned int offs, int defvalue=-1) const |
| bool | null () const |
| unsigned int | length () const |
| unsigned int | overAlloc () const |
| void | overAlloc (unsigned int bytes) |
| void | clear (bool deleteData=true) |
| DataBlock & | assign (void *value, unsigned int len, bool copyData=true, unsigned int allocated=0) |
| void | append (void *value, unsigned int len) |
| void | append (const DataBlock &value) |
| void | append (const String &value) |
| void | insert (const DataBlock &value) |
| void | resize (unsigned int len) |
| void | truncate (unsigned int len) |
| void | cut (int len) |
| int | operator[] (signed int index) const |
| int | operator[] (unsigned int index) const |
| DataBlock & | operator= (const DataBlock &value) |
| DataBlock & | operator+= (const DataBlock &value) |
| DataBlock & | operator+= (const String &value) |
| bool | convert (const DataBlock &src, const String &sFormat, const String &dFormat, unsigned maxlen=0) |
| bool | unHexify (const char *data, unsigned int len, char sep) |
| bool | unHexify (const char *data, unsigned int len) |
| bool | unHexify (const String &data) |
| String | sqlEscape (char extraEsc) const |
Public Member Functions inherited from GenObject | |
| GenObject () | |
| virtual | ~GenObject () |
| virtual bool | alive () const |
| virtual void | destruct () |
| virtual const String & | toString () const |
| NamedCounter * | getObjCounter () const |
| NamedCounter * | setObjCounter (NamedCounter *counter) |
Additional Inherited Members | |
Static Public Member Functions inherited from DataBlock | |
| static const DataBlock & | empty () |
Static Public Member Functions inherited from GenObject | |
| static void * | getObject (const String &name, const GenObject *obj) |
| static bool | getObjCounting () |
| static void | setObjCounting (bool enable) |
| static NamedCounter * | getObjCounter (const String &name, bool create=true) |
| static ObjList & | getObjCounters () |
|
inline |
Constructor
|
inline |
Constructor. Set the buffer
| src | Initial data buffer |
| len | Initial data buffer length |
| copyData | True to make a copy of the received data |
| bool decode | ( | DataBlock & | dest, |
| bool | liberal = true |
||
| ) |
Decode this buffer to a destination one
| void encode | ( | String & | dest, |
| unsigned int | lineLen = 0, |
||
| bool | lineAtEnd = false |
||
| ) |
Encode this buffer to a destination string
| dest | Destination string |
| lineLen | The length of a line. If non 0, a line break (CR/LF) will be inserted in the encoded data after each lineLine characters. No line break will be added after the last line. Use the lineAtEnd parameter to do that |
| lineAtEnd | True to add a line break at the end of encoded data |
Base64 append operator for Strings
References DataBlock::append().
Referenced by Base64::operator<<().
Base64 append operator for DataBlocks
References DataBlock::append().
|
inline |
Base64 append operator for C strings
References Base64::operator<<().
1.8.8