openMSX
Base64.hh
Go to the documentation of this file.
1#ifndef BASE64_HH
2#define BASE64_HH
3
4#include "MemBuffer.hh"
5#include <cstdint>
6#include <string>
7#include <string_view>
8#include <utility>
9
10namespace Base64 {
11 [[nodiscard]] std::string encode(const uint8_t* input, size_t inSize);
12 [[nodiscard]] std::pair<openmsx::MemBuffer<uint8_t>, size_t> decode(std::string_view input);
13 [[nodiscard]] bool decode_inplace(std::string_view input, uint8_t* output, size_t outSize);
14}
15
16#endif
Definition: Base64.cc:6
std::string encode(const uint8_t *input, size_t inSize)
Definition: Base64.cc:37
bool decode_inplace(std::string_view input, uint8_t *output, size_t outSize)
Definition: Base64.cc:124
std::pair< MemBuffer< uint8_t >, size_t > decode(std::string_view input)
Definition: Base64.cc:87