[#EVP_PKEY_CTX_set1_hkdf_key]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set1&lowbar;hkdf&lowbar;key
:mrdocs:

Set the HKDF input keying material (IKM) on a PKEY KDF context&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;set1&lowbar;hkdf&lowbar;key(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    unsigned char const* key,
    int keylen);
----

== Return Value

1 on success, or a negative value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Context configured for the HKDF KDF&period;
| *key*
| Input keying material bytes (copied)&period;
| *keylen*
| Length of `key` in bytes&period;
|===


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