[#ASN1_item_digest]
= ASN1&lowbar;item&lowbar;digest
:mrdocs:

Digest the ASN&period;1 encoding of `data` as described by `it&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
ASN1&lowbar;item&lowbar;digest(
    xref:ASN1_ITEM.adoc[ASN1&lowbar;ITEM] const* it,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* type,
    void* data,
    unsigned char* md,
    unsigned int* len);
----

== Return Value

* 1 on success, or 0 on failure&period;
* 1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *it*
| ASN&period;1 item describing the type of `data&period;`
| *type*
| Digest algorithm used to hash the DER encoding&period;
| *data*
| Structure to encode and digest&period;
| *md*
| Buffer that receives the digest bytes (at least EVP&lowbar;MD&lowbar;size(`type))&period;`
| *len*
| Receives the digest length in bytes&period;
|===


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