Skip to content

Instantly share code, notes, and snippets.

@ryanpadilha
Created March 26, 2016 01:29
Show Gist options
  • Save ryanpadilha/8458527e45e2d0e26a7d to your computer and use it in GitHub Desktop.
Save ryanpadilha/8458527e45e2d0e26a7d to your computer and use it in GitHub Desktop.
NFe - Exemplo Assinatura Digital XML
<NFe xmlns="http://www.portalfiscal.inf.br/nfe" >
<infNFe Id="NFe31060243816719000108550000000010001234567897" versao="2.00">
...
</infNFe>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<Reference URI="#NFe31060243816719000108550000000010001234567897">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>vFL68WETQ+mvj1aJAMDx+oVi928=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>IhXNhbdL1F9UGb2ydVc5v/gTB/y6r0KIFaf5evUi1i ...</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>MIIFazCCBFOgAwIBAgIQaHEfNaxSeOEvZGlVDANB ... </X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</NFe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment