| 25 | // ─── Utility ──────────────────────────────────────────────────────────── |
| 26 | |
| 27 | static std::string hex(const uint8_t * data, int len) { |
| 28 | static const char hex_chars[] = "0123456789abcdef"; |
| 29 | std::string out; |
| 30 | out.reserve(len * 2); |
| 31 | for (int i = 0; i < len; ++i) { |
| 32 | out.push_back(hex_chars[data[i] >> 4]); |
| 33 | out.push_back(hex_chars[data[i] & 0x0f]); |
| 34 | } |
| 35 | return out; |
| 36 | } |
| 37 | |
| 38 | static bool mkdir_p(const std::string & path) { |
| 39 | std::error_code ec; |
no outgoing calls
no test coverage detected