[#RSA_padding_add_PKCS1_OAEP_mgf1]
= RSA&lowbar;padding&lowbar;add&lowbar;PKCS1&lowbar;OAEP&lowbar;mgf1
:mrdocs:

Apply PKCS&num;1 OAEP padding with explicit message and MGF1 digests (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;padding&lowbar;add&lowbar;PKCS1&lowbar;OAEP&lowbar;mgf1(
    unsigned char* to,
    int tlen,
    unsigned char const* from,
    int flen,
    unsigned char const* param,
    int plen,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* md,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* mgf1md);
----

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

1 on success, or a non&hyphen;positive value on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *to*
| Destination buffer for the encoded message (typically modulus&hyphen;sized)&period;
| *tlen*
| Capacity of `to` in bytes&period;
| *from*
| Message octets to encode&period;
| *flen*
| Length of `from` in bytes&period;
| *param*
| Optional OAEP encoding parameter &sol; label octets, or NULL&period;
| *plen*
| Length of `param` in bytes&period;
| *md*
| Digest used for OAEP label hashing&semi; NULL selects SHA&hyphen;1&period;
| *mgf1md*
| Digest used for MGF1&semi; NULL selects the same digest as `md&period;`
|===


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