[#EVP_MD_CTX_copy]
= EVP&lowbar;MD&lowbar;CTX&lowbar;copy
:mrdocs:

Copy a digest context into a freshly allocated destination (legacy helper)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;MD&lowbar;CTX&lowbar;copy(
    xref:EVP_MD_CTX.adoc[EVP&lowbar;MD&lowbar;CTX]* out,
    xref:EVP_MD_CTX.adoc[EVP&lowbar;MD&lowbar;CTX] const* in);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *out*
| Destination context&semi; must not already hold digest state (prefer EVP&lowbar;MD&lowbar;CTX&lowbar;copy&lowbar;ex)&period;
| *in*
| Source context to duplicate&period;
|===


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