I am using Soap

<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-4453123">
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:SignatureValue>...How to calculate Signature Value.....</ds:SignatureValue>


Thanks in advance

Recommended Answers

All 4 Replies

This should be described in the documentation of the soap service you're using.

If it is sha1 and you're using php, then sha1('something here') should do it.

You should have a look at the demos on that page. sha1() is not enough, you need to canonicalize the data as described.

you are right brother........

$dom = new DOMDocument();
$canonicalized = $dom->C14N(); // for the whole document

$ssDigest = base64_encode(pack("H*", sha1($canonicalized)));

from above code we easily get a DigestValue...and i have read in somewhere....encrypt of Digestvalue is SignatureValue.

i try manytimes but not get a solution....

how to get SignatureValue from DigestValue ??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.