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

Name

Description

str

NUL‐terminated hex text (optional ':' separators between octets).

buflen

Receives the number of decoded bytes, or may be NULL.

Created with MrDocs