[#EVP_CIPHER_CTX_set_key_length]
= EVP&lowbar;CIPHER&lowbar;CTX&lowbar;set&lowbar;key&lowbar;length
:mrdocs:

Set a variable&hyphen;length cipher&apos;s key length on a cipher context&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;CIPHER&lowbar;CTX&lowbar;set&lowbar;key&lowbar;length(
    xref:EVP_CIPHER_CTX.adoc[EVP&lowbar;CIPHER&lowbar;CTX]* x,
    int keylen);
----

== Return Value

1 on success, or 0 if the length is unsupported&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *x*
| Cipher context whose cipher supports variable key lengths&period;
| *keylen*
| Desired key length in bytes&period;
|===


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