Base64pp
A simple, correct Base64 encoder written in modern C++
Loading...
Searching...
No Matches
base64pp.h
Go to the documentation of this file.
1
4#ifndef BASE64PP_H
5#define BASE64PP_H
6
7#include "base64pp_export.h"
8#include <cstdint>
9#include <optional>
10#include <span>
11#include <string>
12#include <string_view>
13#include <vector>
14
16namespace base64pp
17{
18
23 std::string BASE64PP_EXPORT encode(std::span<std::uint8_t const> const input);
24
32 std::optional<std::vector<std::uint8_t>> BASE64PP_EXPORT decode(std::string_view const encoded_str);
33} // namespace base64pp
34
35#endif // BASE64PP_H
base64pp API namespace
Definition: base64pp.h:17
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.
Definition: base64pp.cpp:85
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,...
Definition: base64pp.cpp:123