[#EVP_DigestSignInit_ex]
= EVP&lowbar;DigestSignInit&lowbar;ex
:mrdocs:

Initialise a digest&hyphen;sign operation using a digest name and library context&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;DigestSignInit&lowbar;ex(
    xref:EVP_MD_CTX.adoc[EVP&lowbar;MD&lowbar;CTX]* ctx,
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]** pctx,
    char const* mdname,
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* libctx,
    char const* props,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* pkey,
    xref:OSSL_PARAM.adoc[OSSL&lowbar;PARAM] const params[]);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Message&hyphen;digest context that will accumulate data to sign&period;
| *pctx*
| Optional address receiving the EVP&lowbar;PKEY&lowbar;CTX used for signing, or NULL&period;
| *mdname*
| Digest algorithm name (for example &quot;SHA256&quot;), or NULL for the key default&period;
| *libctx*
| Library context for algorithm fetches, or NULL for the default&period;
| *props*
| Property query for algorithm fetches, or NULL&period;
| *pkey*
| Private key used to create the signature&period;
| *params*
| Optional parameter array terminated by OSSL&lowbar;PARAM&lowbar;END, or NULL&period;
|===


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