[#EVP_Digest]
= EVP&lowbar;Digest
:mrdocs:

Hash `count` bytes at `data` in one shot and write the digest to `md&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;Digest(
    void const* data,
    size&lowbar;t count,
    unsigned char* md,
    unsigned int* size,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* type,
    xref:ENGINE.adoc[ENGINE]* impl);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *data*
| Input bytes to hash&period;
| *count*
| Number of bytes at `data&period;`
| *md*
| Output buffer for the digest&semi; at most EVP&lowbar;MAX&lowbar;MD&lowbar;SIZE bytes are written&period;
| *size*
| Optional destination for the digest length in bytes, or NULL&period;
| *type*
| Digest algorithm to use&period;
| *impl*
| Optional ENGINE providing `type,` or NULL for the default implementation&period;
|===


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