vdr
2.7.6
|
#include <tools.h>
Public Member Functions | |
cBase64Encoder (const uchar *Data, int Length, int MaxResult=64) | |
~cBase64Encoder () | |
const char * | NextLine (void) |
Private Attributes | |
const uchar * | data |
int | length |
int | maxResult |
int | i |
char * | result |
Static Private Attributes | |
static const char * | b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
cBase64Encoder::cBase64Encoder | ( | const uchar * | Data, |
int | Length, | ||
int | MaxResult = 64 |
||
) |
Sets up a new base 64 encoder for the given Data, with the given Length.
Data will not be copied and must be valid as long as NextLine() will be called. MaxResult defines the maximum number of characters in any result line. The resulting lines may be shorter than MaxResult in case its value is not a multiple of 4.
const char * cBase64Encoder::NextLine | ( | void | ) |
Returns the next line of encoded data (terminated by '\0'), or NULL if there is no more encoded data.
The caller must call NextLine() and process each returned line until NULL is returned, in order to get the entire data encoded. The returned data is only valid until the next time NextLine() is called, or until the object is destroyed.
Definition at line 1439 of file tools.c.
References b64, data, i, length, maxResult, and result.
Referenced by cSVDRPServer::CmdGRAB().
|
staticprivate |
Definition at line 365 of file tools.h.
Referenced by NextLine().
|
private |
Definition at line 360 of file tools.h.
Referenced by cBase64Encoder(), and NextLine().
|
private |
Definition at line 363 of file tools.h.
Referenced by cBase64Encoder(), and NextLine().
|
private |
Definition at line 361 of file tools.h.
Referenced by cBase64Encoder(), and NextLine().
|
private |
Definition at line 362 of file tools.h.
Referenced by cBase64Encoder(), and NextLine().
|
private |
Definition at line 364 of file tools.h.
Referenced by cBase64Encoder(), NextLine(), and ~cBase64Encoder().