hex_digit
hex[i * 2] = hex_digit(p[i] >> 4, uppercase);
hex[i * 2 + 1] = hex_digit(p[i] & 0xF, uppercase);
obuf[2 + i] = hex_digit((u_str[0] >> ((3 - i) * 4)) & 0x0F);
json_write_char(json, hex_digit(c >> 4));
json_write_char(json, hex_digit(c & 0x0F));
buf[0] = hex_digit(v >> 4);
buf[1] = hex_digit(v & 0xf);