[#AES_set_decrypt_key]
= AES&lowbar;set&lowbar;decrypt&lowbar;key
:mrdocs:

Expand a user key into an AES decryption key schedule (deprecated&semi; prefer EVP)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
AES&lowbar;set&lowbar;decrypt&lowbar;key(
    unsigned char const* userKey,
    int const bits,
    xref:AES_KEY.adoc[AES&lowbar;KEY]* key);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *userKey*
| Raw AES key bytes (16, 24, or 32 bytes for 128&sol;192&sol;256&hyphen;bit)&period;
| *bits*
| Key length in bits (128, 192, or 256)&period;
| *key*
| Destination expanded key schedule for AES&lowbar;decrypt() and decrypting modes&period;
|===


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