[#EVP_PKEY_CTX_set_rsa_padding]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;rsa&lowbar;padding
:mrdocs:

Set the RSA padding mode on an EVP&lowbar;PKEY&lowbar;CTX&period;

== Synopsis

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

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

== Return Value

Positive value on success, or 0 &sol; negative on failure (&hyphen;2 if unsupported)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Context used for RSA encrypt, decrypt, sign, or verify&period;
| *pad&lowbar;mode*
| Padding mode such as RSA&lowbar;PKCS1&lowbar;PADDING, RSA&lowbar;NO&lowbar;PADDING, RSA&lowbar;PKCS1&lowbar;OAEP&lowbar;PADDING, RSA&lowbar;X931&lowbar;PADDING, RSA&lowbar;PKCS1&lowbar;PSS&lowbar;PADDING, or RSA&lowbar;PKCS1&lowbar;WITH&lowbar;TLS&lowbar;PADDING&period;
|===


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