Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

XML Digital Signature

Question posted by: Diego Mourglia (Guest) on June 27th, 2008 07:20 PM
Hi

I'm trying to Sign an XML Document Using SignedXml.ComputeSignature from the
namespace System.Security.Cryptography.Xml.

I need the XML in the following way, with the prefix DS ahead the tag name:

<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
- <ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
/>
- <ds:Reference URI="#1003 Fri Jun 06 14:56:14 VET 2008">
- <ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<ds:DigestValue>xctwBpj1DjKCnGWLnxSXrFjv0Xk=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>WI48iJNIBsQJDnMx5OVhQMFL7/AvKR7/+SWWpvqGOm
vazdF64zBvrSskYkPivUvFIL0toB10eqNbXbPIfc/a1XSq0YvOBlMtaX
+ykN/AHZl8FkLPNokQHE wPuxvo2Y+bMt5N9xG6c=</ds:SignatureValue>
- <ds:KeyInfo>
<ds:KeyName>1003</ds:KeyName>
</ds:KeyInfo>
- <ds:Object Id="1003 Fri Jun 06 14:56:14 VET 2008">
- <Originante_ACH>
<num_orden_originante>Datos.....</num_orden_originante>
</Originante_ACH>
</ds:Object>
</ds:Signature>

I have the same XML but without the ds prefix. Anybody kows how to add it ?

Tanks

Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
 
Not the answer you were looking for? Post your question . . .
184,043 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors