MCPcopy Create free account
hub / github.com/78/tenbox / HexEncode

Function HexEncode

src/daemon/runtime_manager.cpp:36–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34};
35
36std::string HexEncode(const std::vector<uint8_t>& bytes) {
37 static constexpr char kDigits[] = "0123456789abcdef";
38 std::string out(bytes.size() * 2, '\0');
39 for (size_t i = 0; i < bytes.size(); ++i) {
40 out[i * 2] = kDigits[bytes[i] >> 4];
41 out[i * 2 + 1] = kDigits[bytes[i] & 0x0f];
42 }
43 return out;
44}
45
46std::string Base64Encode(const std::vector<uint8_t>& bytes) {
47 static constexpr char kAlphabet[] =

Callers 3

SendConsoleInputMethod · 0.85
AttachConsoleMethod · 0.85
BroadcastConsoleMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected