ASN1_item_digest

Digest the ASN.1 encoding of data as described by it.

Synopsis

Declared in <openssl/x509.h>

int
ASN1_item_digest(
    ASN1_ITEM const* it,
    EVP_MD const* type,
    void* data,
    unsigned char* md,
    unsigned int* len);

Return Value

  • 1 on success, or 0 on failure.
  • 1 on success, or 0 on failure.

Parameters

NameDescription
itASN.1 item describing the type of data.
typeDigest algorithm used to hash the DER encoding.
dataStructure to encode and digest.
mdBuffer that receives the digest bytes (at least EVP_MD_size(type)).
lenReceives the digest length in bytes.