[#RSA_public_decrypt]
= RSA&lowbar;public&lowbar;decrypt
:mrdocs:

RSA public&hyphen;key decryption &sol; signature recovery (deprecated)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
RSA&lowbar;public&lowbar;decrypt(
    int flen,
    unsigned char const* from,
    unsigned char* to,
    xref:RSA.adoc[RSA]* rsa,
    int padding);
----

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

Number of bytes written to `to,` or a negative value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *flen*
| Length of `from` in bytes&period;
| *from*
| Ciphertext &sol; signature bytes to process with the public key&period;
| *to*
| Output buffer of at least RSA&lowbar;size(`rsa)` bytes&period;
| *rsa*
| RSA public key&period;
| *padding*
| Padding mode such as RSA&lowbar;PKCS1&lowbar;PADDING or RSA&lowbar;NO&lowbar;PADDING&period;
|===


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