[#EVP_PKEY_CTX_hex2ctrl]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;hex2ctrl
:mrdocs:

Decode a hex string to bytes and pass them to EVP&lowbar;PKEY&lowbar;CTX&lowbar;ctrl as the p2 buffer&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;CTX&lowbar;hex2ctrl(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    int cmd,
    char const* hex);
----

== Return Value

Positive on success, 0 or negative on failure (same convention as EVP&lowbar;PKEY&lowbar;CTX&lowbar;ctrl)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Key context that receives the control&period;
| *cmd*
| Control command number understood by the key method&period;
| *hex*
| NUL&hyphen;terminated hexadecimal encoding of the binary value&period;
|===


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