Skip to content

Instantly share code, notes, and snippets.

@gregvish
Created November 7, 2013 22:18
Show Gist options
  • Save gregvish/7362851 to your computer and use it in GitHub Desktop.
Save gregvish/7362851 to your computer and use it in GitHub Desktop.
xml signing example 1
<?xml version="1.0" encoding="UTF-8"?>
<document>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference>
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue/>
</Reference>
</SignedInfo>
<SignatureValue/>
<KeyInfo>
<X509Data/>
</KeyInfo>
</Signature>
<firstelement attr1="attr1">
Content of first element.
<secondelement attr2="attr2">
Content of the second element.
<thirdelement attr3="attr3">
And the content of the third element.
</thirdelement>
</secondelement>
</firstelement>
</document>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment