0

I am using Soap

<ds:SignedInfo>
<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:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>'.$ssDigest.'</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>...How to calculate Signature Value.....</ds:SignatureValue>

..............

Thanks in advance

Edited by peter_budo: Keep It Clear - Do wrap your programming code blocks within [code] ... [/code] tags

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by jaydipsinh
0

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.

Edited by pritaeas: n/a

0

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

0

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

$dom = new DOMDocument();
$dom->loadXML($myXMLData);
$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 ??

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.