[#EVP_DigestFinal_ex]
= EVP&lowbar;DigestFinal&lowbar;ex
:mrdocs:

Finalize a digest computation and write the message digest to `md` without resetting ownership of `ctx&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;DigestFinal&lowbar;ex(
    xref:EVP_MD_CTX.adoc[EVP&lowbar;MD&lowbar;CTX]* ctx,
    unsigned char* md,
    unsigned int* s);
----

== Description

Unlike EVP&lowbar;DigestFinal(), the context may be reused after EVP&lowbar;MD&lowbar;CTX&lowbar;reset() without freeing it&period;

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Digest context that has absorbed input via EVP&lowbar;DigestUpdate()&period;
| *md*
| Buffer that receives the digest&semi; must be large enough for EVP&lowbar;MD&lowbar;CTX&lowbar;get&lowbar;size(`ctx)` bytes&period;
| *s*
| Optional destination for the digest length in bytes, or NULL&period;
|===


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