++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_INFO,
                                         &quot;label&quot;, (size_t)5);
*p = OSSL_PARAM_construct_end();
if (EVP_KDF_derive(kctx, out, sizeof(out), params) &lt;= 0) {
    error(&quot;EVP_KDF_derive&quot;);
}

EVP_KDF_CTX_free(kctx);</code></pre>

<p>This example derives 10 bytes using H(x) = HMAC(SHA-256), with the secret key &quot;secret&quot;, fixedinfo value &quot;label&quot; and salt &quot;salt&quot;:</p>

<pre><code>EVP_KDF *kdf;
EVP_KDF_CTX *