Implement decode and encode function for base64.
More...
#include <Base64.h>
|
static string | encode (const string &data) |
| Encodes the given string data. More...
|
|
static string | encode (const unsigned char *data, const unsigned int size) |
| Encodes the first <size> bytes of the given buffer. More...
|
|
static string | decode (const string &data) |
| Decodes given data. More...
|
|
static string | decode (const unsigned char *data, const unsigned int size) |
| Decodes given data with the specified size. More...
|
|
static unsigned int | encodedLength (const string &data) |
| Returns the length of the encoded data. More...
|
|
static unsigned int | encodedLength (const unsigned char *data, const unsigned int size) |
| Returns the length of the encoded data. More...
|
|
static unsigned int | decodedLength (const string &data) |
| Returns the length of the decoded data given as a param. More...
|
|
static unsigned int | decodedLength (const unsigned char *data, const unsigned int size) |
| Returns the length of the decoded data given as a param. More...
|
|
static bool | isBase64 (const string &text) |
| Return TRUE if input text is in base64 format, FALSE otherwise. More...
|
|
|
static string | m_Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
| The alphabet to use for encode/decode operations. More...
|
|
static char | m_FillChar = '=' |
| Character to fill the output when the length isn't 4 multiplier. More...
|
|
Implement decode and encode function for base64.
- Author
- Horia Beschea
string Base64::decode |
( |
const string & |
data | ) |
|
|
static |
Decodes given data.
- Parameters
-
[in] | data | Data to be decoded in base64 format |
- Returns
- The decoded string
string Base64::decode |
( |
const unsigned char * |
data, |
|
|
const unsigned int |
size |
|
) |
| |
|
static |
Decodes given data with the specified size.
- Parameters
-
[in] | data | The string to be decoded |
[in] | size | Number of characters to be decoded |
- Returns
- The decoded data
unsigned int Base64::decodedLength |
( |
const string & |
data | ) |
|
|
static |
Returns the length of the decoded data given as a param.
- Parameters
-
[in] | data | String to be decoded and return it's length |
- Returns
- The length of the decoded data
unsigned int Base64::decodedLength |
( |
const unsigned char * |
data, |
|
|
const unsigned int |
size |
|
) |
| |
|
static |
Returns the length of the decoded data given as a param.
- Parameters
-
[in] | data | String to be decoded and return it's length 'param[in] size Number of characters to decode from input string |
- Returns
- The length of the decoded data
string Base64::encode |
( |
const string & |
data | ) |
|
|
static |
Encodes the given string data.
- Parameters
-
[in] | data | Input data to encode |
- Returns
- Encoded string in base64 format
string Base64::encode |
( |
const unsigned char * |
data, |
|
|
const unsigned int |
size |
|
) |
| |
|
static |
Encodes the first <size> bytes of the given buffer.
- Parameters
-
[in] | data | The string to be encoded |
[in] | size | Number of characters to be encoded |
- Returns
- The encoded string
unsigned int Base64::encodedLength |
( |
const string & |
data | ) |
|
|
static |
Returns the length of the encoded data.
- Parameters
-
[in] | data | String to be encoded and return it's length |
- Returns
- The length of the encoded data
unsigned int Base64::encodedLength |
( |
const unsigned char * |
data, |
|
|
const unsigned int |
size |
|
) |
| |
|
static |
Returns the length of the encoded data.
- Parameters
-
[in] | data | String to be encoded and return it's length |
[in] | size | Number of characters to encode from input string |
- Returns
- The length of the encoded data
bool Base64::isBase64 |
( |
const string & |
text | ) |
|
|
static |
Return TRUE if input text is in base64 format, FALSE otherwise.
- Parameters
-
[in] | text | Input string to be tested |
- Returns
- TRUE if input text is in base64 format, FALSE otherwise
string Base64::m_Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" |
|
staticprivate |
The alphabet to use for encode/decode operations.
char Base64::m_FillChar = '=' |
|
staticprivate |
Character to fill the output when the length isn't 4 multiplier.
The documentation for this class was generated from the following files: