Convert a byte buffer to a newly allocated colon-separated hex string.
Declared in <openssl/crypto.h>
char*
OPENSSL_buf2hexstr(
unsigned char const* buf,
long buflen);
Newly allocated string such as "AB:CD", or NULL on error; free with OPENSSL_free.
| Name | Description |
|---|---|
| buf | Bytes to convert. |
| buflen | Number of bytes at buf; negative treats the buffer as unsigned. |