[#EVP_PKEY_CTX_set_hkdf_mode]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;hkdf&lowbar;mode
:mrdocs:

Select HKDF extract&sol;expand mode on a key&hyphen;derivation EVP&lowbar;PKEY&lowbar;CTX&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;hkdf&lowbar;mode(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    int mode);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| HKDF derivation context&period;
| *mode*
| EVP&lowbar;PKEY&lowbar;HKDEF&lowbar;MODE&lowbar;EXTRACT&lowbar;AND&lowbar;EXPAND, EXTRACT&lowbar;ONLY, or EXPAND&lowbar;ONLY&period;
|===


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