[#EVP_DigestInit_ex2]
= EVP&lowbar;DigestInit&lowbar;ex2
:mrdocs:

Initialize a digest context with `type` and optional algorithm parameters&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;DigestInit&lowbar;ex2(
    xref:EVP_MD_CTX.adoc[EVP&lowbar;MD&lowbar;CTX]* ctx,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* type,
    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*
| Digest context to (re)initialize&semi; must have been created with EVP&lowbar;MD&lowbar;CTX&lowbar;new()&period;
| *type*
| Digest algorithm, or NULL to reuse the algorithm already associated with `ctx&period;`
| *params*
| Optional OSSL&lowbar;PARAM array applied to the digest (terminated by OSSL&lowbar;PARAM&lowbar;END), or NULL&period;
|===


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