| 95 | } |
| 96 | |
| 97 | static bool is_hex_string(const std::string & s, size_t expected_len) { |
| 98 | if (s.length() != expected_len) { |
| 99 | return false; |
| 100 | } |
| 101 | for (const char c : s) { |
| 102 | if (!is_hex_char(c)) { |
| 103 | return false; |
| 104 | } |
| 105 | } |
| 106 | return true; |
| 107 | } |
| 108 | |
| 109 | static bool is_alphanum(const char c) { |
| 110 | return (c >= 'A' && c <= 'Z') || |
no test coverage detected