[#DH_generate_parameters_ex]
= DH&lowbar;generate&lowbar;parameters&lowbar;ex
:mrdocs:

Generate Diffie&hyphen;Hellman domain parameters into `dh` (deprecated)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
DH&lowbar;generate&lowbar;parameters&lowbar;ex(
    xref:DH.adoc[DH]* dh,
    int prime&lowbar;len,
    int generator,
    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.
====
== Description

Prefer EVP&lowbar;PKEY&lowbar;paramgen for new code&period;

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dh*
| Destination DH object that receives p and g&period;
| *prime&lowbar;len*
| Desired bit length of the prime modulus p&period;
| *generator*
| Generator g (commonly 2 or 5)&period;
| *cb*
| Optional BN&lowbar;GENCB progress callback, or NULL&period;
|===


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