Decode a hex string into buf, optionally ignoring separator sep.
Declared in <openssl/crypto.h>
int
OPENSSL_hexstr2buf_ex(
unsigned char* buf,
size_t buf_n,
size_t* buflen,
char const* str,
char const sep);
1 on success, or 0 on failure (invalid input or insufficient buf_n).
| Name | Description |
|---|---|
| buf | Destination byte buffer, or NULL to only compute the required length. |
| buf_n | Capacity of buf in bytes (ignored when buf is NULL). |
| buflen | Receives the number of decoded bytes, or may be NULL. |
| str | NUL-terminated hex text (may contain sep between octets). |
| sep | Optional separator character to skip (for example ':'), or '0' for none. |