| 1540 | } |
| 1541 | |
| 1542 | static void HexEncode(char ch, std::ostream& os) |
| 1543 | { |
| 1544 | const char *hex_chars = "0123456789ABCDEF"; |
| 1545 | |
| 1546 | os << hex_chars[ch >> 4 & 0x0f]; |
| 1547 | os << hex_chars[ch & 0x0f]; |
| 1548 | } |
| 1549 | |
| 1550 | static int HexDecode(char hc) |
| 1551 | { |