OPENSSL_hexchar2int

Convert a single hexadecimal digit character to its 0–15 value.

Synopsis

Declared in <openssl/crypto.h>

int
OPENSSL_hexchar2int(unsigned char c);

Return Value

Nibble value 0–15, or -1 if c is not a hex digit.

Parameters

NameDescription
cASCII hex digit ('0'–'9', 'a'–'f', or 'A'–'F').