[#EVP_PKEY_CTX_md]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;md
:mrdocs:

Set a digest algorithm on a key context by name for the given operation&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;CTX&lowbar;md(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    int optype,
    int cmd,
    char const* md);
----

== Return Value

Positive value on success, or a non&hyphen;positive value on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Key context to update&period;
| *optype*
| Operation type such as EVP&lowbar;PKEY&lowbar;OP&lowbar;TYPE&lowbar;SIG&period;
| *cmd*
| Control command that expects an EVP&lowbar;MD (for example EVP&lowbar;PKEY&lowbar;CTRL&lowbar;MD)&period;
| *md*
| Digest name such as &quot;SHA256&quot;&period;
|===


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