[#RSA_generate_key]
= RSA&lowbar;generate&lowbar;key
:mrdocs:

Generate an RSA key pair (very old API&semi; deprecated — prefer RSA&lowbar;generate&lowbar;key&lowbar;ex)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
xref:RSA.adoc[RSA]*
RSA&lowbar;generate&lowbar;key(
    int bits,
    unsigned long e,
    void(* callback)(int, int, void*),
    void* cb&lowbar;arg);
----

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

New RSA key pair, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *bits*
| Modulus size in bits&period;
| *e*
| Public exponent (for example 65537)&period;
| *callback*
| Optional progress callback, or NULL&period;
| *cb&lowbar;arg*
| Opaque argument passed to `callback&period;`
|===


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