Base64pp
A simple, correct Base64 encoder written in modern C++
|
base64pp API namespace More...
Functions | |
std::string BASE64PP_EXPORT | encode (std::span< std::uint8_t const > const input) |
This function will encode a blob of data into a base64 string. | |
std::optional< std::vector< std::uint8_t > > BASE64PP_EXPORT | decode (std::string_view const encoded_str) |
Decodes a base64 encoded string, returning an optional blob. If the decoding fails, it returns std::nullopt. | |
base64pp API namespace
std::optional< std::vector< std::uint8_t > > base64pp::decode | ( | std::string_view const | encoded_str | ) |
Decodes a base64 encoded string, returning an optional blob. If the decoding fails, it returns std::nullopt.
encoded_str | - the base64 encoded string |
std::string base64pp::encode | ( | std::span< std::uint8_t const > const | input | ) |
This function will encode a blob of data into a base64 string.
input | - a span pointing to a binary blob to encode. |