is_hex_str
static bool is_hex_str(char *);
n = is_hex_str(p) ? BN_hex2bn(val, p) : BN_dec2bn(val, p);