IXpsSigningOptions::SetDigestMethod method
Sets the URI of the digest method.
Syntax
HRESULT SetDigestMethod(
[in] LPCWSTR digestMethod
);
Parameters
digestMethod [in]
The URI of the digest method.This parameter must refer to the URI of a valid digest method. The following digest methods have been tested in Windows 7:
http://www.w3.org/2000/09/xmldsig\#sha1 [RFC3275]
http://www.w3.org/2001/04/xmldsig-more\#sha256
Return value
If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code.
Remarks
The digest method must be set before signing.
When a new instance of this interface is returned by IXpsSignatureManager::CreateSigningOptions, the SignatureMethod and DigestMethod properties are not initialized. They must be initialized before the new interface can be used as a parameter of the Sign method.
Sets the string that identifies the URI of the algorithm that is used to digest the parts, relationships, and signature references. The following is an example of a valid URI: http://www.w3.org/2000/09/xmldsig#sha1.
The signing certificate, signature method, and digest method must be compatible with one another.
Requirements
Minimum supported client |
Windows 7 [desktop apps only] |
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |
Header |
Xpsdigitalsignature.h |
IDL |
XpsDigitalSignature.idl |