[#EVP_PKEY_CTX_set_dh_pad]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;dh&lowbar;pad
:mrdocs:

Enable or disable leading&hyphen;zero padding of the DH shared secret to the prime length&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;pad(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    int pad);
----

== Return Value

1 on success, or a negative value for unsupported &sol; failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Key&hyphen;derivation &sol; derive context for a DH key&period;
| *pad*
| Non&hyphen;zero to pad the secret to BN&lowbar;num&lowbar;bytes(p)&semi; 0 to return the minimal big&hyphen;endian form&period;
|===


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