[#RSA_X931_generate_key_ex]
= RSA&lowbar;X931&lowbar;generate&lowbar;key&lowbar;ex
:mrdocs:

Generate an RSA key pair using the X9&period;31 prime&hyphen;generation method (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;X931&lowbar;generate&lowbar;key&lowbar;ex(
    xref:RSA.adoc[RSA]* rsa,
    int bits,
    xref:BIGNUM.adoc[BIGNUM] const* e,
    xref:BN_GENCB.adoc[BN&lowbar;GENCB]* cb);
----

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

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rsa*
| Destination RSA object to populate&period;
| *bits*
| Desired modulus size in bits&period;
| *e*
| Public exponent&period;
| *cb*
| Optional BN&lowbar;GENCB progress callback, or NULL&period;
|===


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