[#EVP_PKEY_get_default_digest_name]
= EVP&lowbar;PKEY&lowbar;get&lowbar;default&lowbar;digest&lowbar;name
:mrdocs:

Write the default digest name recommended for signing with `pkey&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;get&lowbar;default&lowbar;digest&lowbar;name(
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* pkey,
    char* mdname,
    size&lowbar;t mdname&lowbar;sz);
----

== Return Value

1 if a default digest is required, 2 if any digest is allowed, or a negative&sol;zero value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pkey*
| Key whose signature defaults are queried&period;
| *mdname*
| Output buffer receiving a NUL&hyphen;terminated digest name (for example &quot;SHA256&quot;)&period;
| *mdname&lowbar;sz*
| Capacity of `mdname` in bytes&period;
|===


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