IXpsSigningOptions::SetSignatureMethod method
Sets the signature method.
Syntax
HRESULT SetSignatureMethod(
[in] LPCWSTR signatureMethod
);
Parameters
signatureMethod [in]
The signature method expressed as a URI.This parameter must refer to a valid signature method. The following signature methods have been tested in Windows 7:
http://www.w3.org/2000/09/xmldsig\#rsa-sha1 [RFC3275]
http://www.w3.org/2001/04/xmldsig-more\#rsa-sha256 [RF4051]
http://www.w3.org/2001/04/xmldsig-more\#rsa-sha384 [RF4051]
http://www.w3.org/2001/04/xmldsig-more\#rsa-sha512 [RF4051]
http://www.w3.org/2001/04/xmldsig-more\#ecdsa-sha1 [RF4051]
http://www.w3.org/2001/04/xmldsig-more\#ecdsa-sha256 [RF4051]
http://www.w3.org/2001/04/xmldsig-more\#ecdsa-sha384 [RF4051]
http://www.w3.org/2001/04/xmldsig-more\#ecdsa-sha512 [RF4051]
Return value
If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code.
Remarks
The signature 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.
The URI in signatureMethod must be the URI of a valid signing algorithm, such as http://www.w3.org/2000/09/xmldsig\#rsa-sha1, and it must be supported by the signing certificate.
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 |