MLIB
|
Definition of Base64 encoding/decoding functions. More...
#include <string>
Go to the source code of this file.
Functions | |
size_t | mlib::base64dec (const char *in, void *out) |
Decode a Base64 string. | |
size_t | mlib::base64enc (const void *in, char *out, size_t ilen) |
Encode input bytes to Base64 producing a null-terminated string. | |
std::string | mlib::base64enc (const std::string &in) |
String-aware overload. | |
std::string | mlib::base64dec (const std::string &in) |
String-aware overload. | |
Definition of Base64 encoding/decoding functions.
(c) Mircea Neacsu 2017
size_t mlib::base64dec | ( | const char * | in, |
void * | out | ||
) |
Decode a Base64 string.
in | input string |
out | output decoded bytes |
If output pointer is NULL the function only returns the required size of output block.
std::string mlib::base64dec | ( | const std::string & | in | ) |
String-aware overload.
in | input string |
std::string mlib::base64enc | ( | const std::string & | in | ) |
String-aware overload.
in | input string |
size_t mlib::base64enc | ( | const void * | in, |
char * | out, | ||
size_t | ilen | ||
) |
Encode input bytes to Base64 producing a null-terminated string.
in | input bytes |
out | output encoded string |
ilen | number of bytes to encode |
If output pointer is NULL the function only returns the length of resulting string.