24 size_t data_len = data.length();
26 size_t padding = 4 - (data_len % 4);
30 uri_dec.resize(data_len + padding);
34 data.begin(), data.end(), uri_dec.begin(), [](
unsigned char c) ->
unsigned char {
45 uri_dec.replace(uri_dec.begin() + data_len, uri_dec.end(), padding,
'=');
std::string decode_base64_uri(const std::string &data, bool trim_nulls)
OUTPUT transform(INPUT const &input, FUNC const &func)
std::string decode_base64(const std::string &val, bool trim_nulls)