e6055ac974358d31bb2269731dcac57fbe910cc2Timo Sirainen/* Decimal -> hex string translation. The result isn't NUL-terminated. */
e6055ac974358d31bb2269731dcac57fbe910cc2Timo Sirainenvoid dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size);
e6055ac974358d31bb2269731dcac57fbe910cc2Timo Sirainen/* Parses hex string and returns its decimal value, or 0 in case of errors */
68a4946b12583b88fa802e52ebee45cd96056772Timo Sirainenuintmax_t hex2dec(const unsigned char *data, unsigned int len) ATTR_PURE;