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

Generate Diffie&hyphen;Hellman parameters with a legacy progress callback (deprecated)&period;

== Synopsis

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

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

Newly allocated DH with generated parameters, or NULL on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *prime&lowbar;len*
| Desired length of the prime p in bits&period;
| *generator*
| DH generator g (commonly 2 or 5)&period;
| *callback*
| Optional progress callback (int, int, void &ast;), or NULL&period;
| *cb&lowbar;arg*
| Opaque pointer passed to `callback&period;`
|===


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