CryptXmlDigestReference function (cryptxml.h)

The CryptXmlDigestReference function is used by an application to digest the resolved reference. This function applies transforms before updating the digest.


HRESULT CryptXmlDigestReference(
  [in] HCRYPTXML               hReference,
       DWORD                   dwFlags,
  [in] CRYPT_XML_DATA_PROVIDER *pDataProviderIn


[in] hReference

The handle of a Reference element.


Specifies values that control how the process applies transforms.

Currently defined dwFlags are shown in the following table.

Value Meaning
Specifies that the processing engine will create the digest without applying the transform chain engine.

[in] pDataProviderIn

A pointer to a CRYPT_XML_DATA_PROVIDER structure that specifies the data provider. The CryptXmlDigestReference function always calls the fpnClose function on the data provider.

Return value

If the function succeeds, the function returns zero.

If the function fails, it returns an HRESULT value that indicates the error.


When the CRYPT_XML_REFERENCE_DATA_TRANSFORMED flag is set, the processing engine adds received data directly to the digest without applying the transform chain engine.

Note  The CryptXmlDigestReference function always calls the function pointed to by the fpnClose member of the CRYPT_XML_DATA_PROVIDER structure pointed to by the pDataProviderIn parameter.


Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header cryptxml.h
Library Cryptxml.lib
DLL Cryptxml.dll