Specifying the Digest Method
Specifying the Digest Method
By default, the digest value for the signature is computed via the SHA-1 algorithm, and the <Signature> element in the security header includes something like this:
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
<DigestValue>waSMFeYMruQn9XHx85HqunhMGIA=</DigestValue>
You can specify a different digest method for the signature. To do so, call the SetDigestMethod() method of your instance of %XML.Security.SignatureOpens in a new tab. For the argument, use one of the following macros (which are contained in the %soap.inc file):
-
$$$SOAPWSsha1 (the default)
-
$$$SOAPWSsha256
-
$$$SOAPWSsha384
-
$$$SOAPWSsha512
For example:
do sig.SetDigestMethod($$$SOAPWSsha256)