[#OPENSSL_buf2hexstr]
= OPENSSL&lowbar;buf2hexstr
:mrdocs:

Convert a byte buffer to a newly allocated colon&hyphen;separated hex string&period;

== Synopsis

Declared in `&lt;openssl&sol;crypto&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
char*
OPENSSL&lowbar;buf2hexstr(
    unsigned char const* buf,
    long buflen);
----

== Return Value

Newly allocated string such as &quot;AB&colon;CD&quot;, or NULL on error&semi; free with OPENSSL&lowbar;free&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buf*
| Bytes to convert&period;
| *buflen*
| Number of bytes at `buf&semi;` negative treats the buffer as unsigned&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
