| 9 | namespace WasmEdge { |
| 10 | |
| 11 | uint8_t convertCharToHex(const char C) { |
| 12 | if (C >= '0' && C <= '9') { |
| 13 | return static_cast<uint8_t>(C - '0') + UINT8_C(0); |
| 14 | } |
| 15 | if (C >= 'a' && C <= 'f') { |
| 16 | return static_cast<uint8_t>(C - 'a') + UINT8_C(10); |
| 17 | } |
| 18 | if (C >= 'A' && C <= 'F') { |
| 19 | return static_cast<uint8_t>(C - 'A') + UINT8_C(10); |
| 20 | } |
| 21 | return UINT8_C(0); |
| 22 | } |
| 23 | |
| 24 | void convertBytesToHexStr(Span<const uint8_t> Src, std::string &Dst, |
| 25 | const uint32_t Padding, const bool IsLittleEndian) { |
no outgoing calls
no test coverage detected