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.
|
| |
| static void | encode (std::string &b64str, const void *buff, size_t buffsize) |
| | Encode a buffer into a std::string.
|
| |
| static size_t | decodeSize (const std::string &b64str) |
| | Calculate the length of the binary buffer that would result deconverting the indicated base64 string.
|
| |
| static unsigned char * | decode (const std::string &b64str) |
| | Decode a base64 string allocating a new buffer.
|
| |
| static unsigned char * | decode (const std::string &b64str, size_t *resultSize) |
| | Decode a base64 string allocating a new buffer.
|
| |
| static void | decode (std::vector< unsigned char > &result, const std::string &b64str) |
| | Decode a base64 string into an existing std::vector.
|
| |
Base64 encoding class.
This class provide functions to encode and decode strings and buffers
acording to Base 64 format.
◆ encodeSize()
| 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) |
◆ encode()
| 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) |
◆ decodeSize()
| 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
-
◆ decode() [1/3]
| unsigned char * Radar::Base64::decode |
( |
const std::string & | b64str | ) |
|
|
static |
Decode a base64 string allocating a new buffer.
- Parameters
-
◆ decode() [2/3]
| 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 |
◆ decode() [3/3]
| 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: