openMSX
HexDump.hh
Go to the documentation of this file.
1 #ifndef HEXDUMP_HH
2 #define HEXDUMP_HH
3 
4 #include "MemBuffer.hh"
5 #include <string>
6 #include <string_view>
7 #include <cstdint>
8 #include <utility>
9 
10 namespace HexDump {
11  [[nodiscard]] std::string encode(const uint8_t* input, size_t len, bool newlines = true);
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
HexDump
Definition: HexDump.cc:7
Base64::encode
string encode(const uint8_t *input, size_t inSize)
Definition: Base64.cc:38
MemBuffer.hh
Base64::decode
std::pair< MemBuffer< uint8_t >, size_t > decode(std::string_view input)
Definition: Base64.cc:88
HexDump::decode_inplace
bool decode_inplace(std::string_view input, uint8_t *output, size_t outSize)
Definition: HexDump.cc:72