Base64 encoding class.
More...
#include <radarlib/base64.hpp>
|
static size_t | encodeSize (size_t buffsize) |
| Calculate the length of the base64 string that would result converting a buffer large 'buffsize' bytes. More...
|
|
static void | encode (std::string &b64str, const void *buff, size_t buffsize) |
| Encode a buffer into a std::string. More...
|
|
static size_t | decodeSize (const std::string &b64str) |
| Calculate the length of the binary buffer that would result deconverting the indicated base64 string. More...
|
|
static unsigned char * | decode (const std::string &b64str) |
| Decode a base64 string allocating a new buffer. More...
|
|
static unsigned char * | decode (const std::string &b64str, size_t *resultSize) |
| Decode a base64 string allocating a new buffer. More...
|
|
static void | decode (std::vector< unsigned char > &result, const std::string &b64str) |
| Decode a base64 string into an existing std::vector. More...
|
|
Base64 encoding class.
This class provide functions to encode and decode strings and buffers
acording to Base 64 format.
size_t Radar::Base64::encodeSize |
( |
size_t |
buffsize | ) |
|
|
static |
Calculate the length of the base64 string that would result converting a buffer large 'buffsize' bytes.
- Parameters
-
buffsize | the binary buffer length (in bytes) |
void Radar::Base64::encode |
( |
std::string & |
b64str, |
|
|
const void * |
buff, |
|
|
size_t |
buffsize |
|
) |
| |
|
static |
Encode a buffer into a std::string.
- Parameters
-
b64str | the destination string variable |
buff | the binary buffer |
buffsize | the binary buffer length (in bytes) |
size_t Radar::Base64::decodeSize |
( |
const std::string & |
b64str | ) |
|
|
static |
Calculate the length of the binary buffer that would result deconverting the indicated base64 string.
- Parameters
-
unsigned char * Radar::Base64::decode |
( |
const std::string & |
b64str | ) |
|
|
static |
Decode a base64 string allocating a new buffer.
- Parameters
-
unsigned char * Radar::Base64::decode |
( |
const std::string & |
b64str, |
|
|
size_t * |
resultSize |
|
) |
| |
|
static |
Decode a base64 string allocating a new buffer.
- Parameters
-
b64str | the encoded string |
resultSize | a pointer to a variabile that will store the size of the allocated buffer |
void Radar::Base64::decode |
( |
std::vector< unsigned char > & |
result, |
|
|
const std::string & |
b64str |
|
) |
| |
|
static |
Decode a base64 string into an existing std::vector.
- Parameters
-
result | the result vector that will store the decoded binary data |
b64str | the encoded string |
The documentation for this class was generated from the following files: