OPENSSL_hexstr2buf

Decode a hexadecimal string into a newly allocated byte buffer.

Synopsis

Declared in <openssl/crypto.h>

unsigned char*
OPENSSL_hexstr2buf(
    char const* str,
    long* buflen);

Return Value

Allocated buffer with decoded bytes, or NULL on error; free with OPENSSL_free().

Parameters

NameDescription
strNUL-terminated hex text (optional ':' separators between octets).
buflenReceives the number of decoded bytes, or may be NULL.