This is a base64 convert library writting in c++.
Add <base64_cpp/base64.h>
to your include list
#include <base64_cpp/base64.h>
Convert buffer to string
std::string _buff_str = "hello string buffer";
std::string _base64_str = base64::Encode(_buff_str, _buff_str.size());
Convert base64 string back to buffer. Use function decode with a base64 string will returns a buff object, this is a pair object with a smart pointer(buff.first) and size(buff.second)
auto _buff = base64::Decode(_base64_str);
To build test project, please according the following lines in bash
cmake . && make
Library will be installed to /usr/local/include/base64_cpp/
cmake . && make && make install
To run test program
./base64_test
Drop an email to [email protected].