openMSX
Base64.hh
Go to the documentation of this file.
1#ifndef BASE64_HH
2#define BASE64_HH
3
4#include "MemBuffer.hh"
5
6#include <cstdint>
7#include <span>
8#include <string>
9#include <string_view>
10
11namespace Base64 {
12 [[nodiscard]] std::string encode(std::span<const uint8_t> input);
13 [[nodiscard]] openmsx::MemBuffer<uint8_t> decode(std::string_view input);
14 [[nodiscard]] bool decode_inplace(std::string_view input, std::span<uint8_t> output);
15}
16
17#endif
This class manages the lifetime of a block of memory.
Definition MemBuffer.hh:32
bool decode_inplace(std::string_view input, std::span< uint8_t > output)
Definition Base64.cc:126
MemBuffer< uint8_t > decode(std::string_view input)
Definition Base64.cc:89
std::string encode(std::span< const uint8_t > input)
Definition Base64.cc:41