[#EVP_Q_digest]
= EVP&lowbar;Q&lowbar;digest
:mrdocs:

One&hyphen;shot digest of `data` using a fetched algorithm name&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;Q&lowbar;digest(
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* libctx,
    char const* name,
    char const* propq,
    void const* data,
    size&lowbar;t datalen,
    unsigned char* md,
    size&lowbar;t* mdlen);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *libctx*
| Library context for the fetch, or NULL for the default&period;
| *name*
| Digest algorithm name (for example &quot;SHA256&quot;)&period;
| *propq*
| Property query for the fetch, or NULL&period;
| *data*
| Bytes to hash&period;
| *datalen*
| Number of bytes at `data&period;`
| *md*
| Output buffer for the digest (at least the algorithm size)&period;
| *mdlen*
| Optional in&sol;out length of `md&semi;` updated to the digest size&period;
|===


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