[#EVP_PKEY_CTX_set_dh_paramgen_seed]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;dh&lowbar;paramgen&lowbar;seed
:mrdocs:

Set a fixed seed for DH parameter generation (testing &sol; reproducible params)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;dh&lowbar;paramgen&lowbar;seed(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    unsigned char const* seed,
    size&lowbar;t seedlen);
----

== Description

Persist `seed` if later validation of p, q, and verifiable g is required&semi; it is not part of a stored key&period;

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| EVP&lowbar;PKEY&lowbar;CTX configured for DH parameter generation&period;
| *seed*
| Seed octets used instead of a random seed&semi; must yield primes on the first iteration&period;
| *seedlen*
| Length of `seed` in bytes&period;
|===


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