[#EVP_DigestInit_ex]
= EVP&lowbar;DigestInit&lowbar;ex
:mrdocs:

Initialise digest context `ctx` for algorithm `type&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;DigestInit&lowbar;ex(
    xref:EVP_MD_CTX.adoc[EVP&lowbar;MD&lowbar;CTX]* ctx,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* type,
    xref:ENGINE.adoc[ENGINE]* impl);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Digest context to initialise (from EVP&lowbar;MD&lowbar;CTX&lowbar;new())&period;
| *type*
| Digest algorithm (for example from EVP&lowbar;sha256()), or NULL to reuse the previous type&period;
| *impl*
| Legacy ENGINE implementing `type,` or NULL for the default implementation&period;
|===


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