| 50 | } |
| 51 | |
| 52 | static Bytes hex_to_bytes(const std::string &hex) |
| 53 | { |
| 54 | Bytes bytes; |
| 55 | assert(hex.size() % 2 == 0); |
| 56 | size_t pos = 0; |
| 57 | while((pos+1 < hex.size())) { |
| 58 | bytes.push_back(hex2byte(hex[pos], hex[pos+1])); |
| 59 | pos += 2; |
| 60 | } |
| 61 | return bytes; |
| 62 | } |
| 63 | |
| 64 | static bool is_bytes_prefix(const Bytes &prefix, const Bytes &bytes) |
| 65 | { |
no test coverage detected