Examples of Canonicalizer20010315ExclWithComments


Examples of org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments

        test.appendChild(elem2);
        local.appendChild(test);
        doc.appendChild(local);

        Node root = doc.getElementsByTagNameNS("http://example.net", "elem2").item(0);
        Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments();
        byte[] reference =
            JavaUtils.getBytesFromFile(getAbsolutePath(
                "src/test/resources/org/apache/xml/security/c14n/inExcl/example2_4_c14nized.xml"));
        byte[] result = c.engineCanonicalizeSubTree(root);
        boolean equals = java.security.MessageDigest.isEqual(reference, result);

        assertTrue(equals);
    }
View Full Code Here

Examples of org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments

                    new InclusiveNamespaces(
                        inclusiveElement, transformObject.getBaseURI()
                    ).getInclusiveNamespaces();
            }

            Canonicalizer20010315ExclWithComments c14n =
                new Canonicalizer20010315ExclWithComments();       
            if (os != null) {
                c14n.setWriter(os);
            }
            byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces);
            XMLSignatureInput output = new XMLSignatureInput(result);

            return output;
        } catch (XMLSecurityException ex) {
            throw new CanonicalizationException("empty", ex);
View Full Code Here

Examples of org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments

           inclusiveNamespaces = new InclusiveNamespaces(inclusiveElement,
                   _transformObject.getBaseURI()).getInclusiveNamespaces();
        }

        Canonicalizer20010315ExclWithComments c14n =
            new Canonicalizer20010315ExclWithComments();       
        if (os!=null) {
           c14n.setWriter( os);
        }
        byte []result; 
        result =c14n.engineCanonicalize(input, inclusiveNamespaces);
        XMLSignatureInput output=new XMLSignatureInput(result);
       
        return output;
     } catch (XMLSecurityException ex) {
        throw new CanonicalizationException("empty", ex);
View Full Code Here

Examples of org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments

                    new InclusiveNamespaces(
                        inclusiveElement, transformObject.getBaseURI()
                    ).getInclusiveNamespaces();
            }

            Canonicalizer20010315ExclWithComments c14n =
                new Canonicalizer20010315ExclWithComments();
            c14n.setSecureValidation(secureValidation);
            if (os != null) {
                c14n.setWriter(os);
            }
            byte[] result = c14n.engineCanonicalize(input, inclusiveNamespaces);
            XMLSignatureInput output = new XMLSignatureInput(result);
            output.setSecureValidation(secureValidation);

            return output;
        } catch (XMLSecurityException ex) {
View Full Code Here

Examples of org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments

         if (inclusiveElement != null) {
            inclusiveNamespaces = new InclusiveNamespaces(inclusiveElement,
                    this._transformObject.getBaseURI());
         }

         Canonicalizer20010315ExclWithComments c14n =
            new Canonicalizer20010315ExclWithComments();

         if (input.isOctetStream()) {
            return new XMLSignatureInput(c14n
               .engineCanonicalize(input.getBytes()));
         } else {
            if (inclusiveNamespaces == null) {
               return new XMLSignatureInput(c14n
                  .engineCanonicalizeXPathNodeSet(input.getNodeSet()));
            } else {
               return new XMLSignatureInput(c14n
                  .engineCanonicalizeXPathNodeSet(input
                     .getNodeSet(), inclusiveNamespaces
                     .getInclusiveNamespaces()));
            }
         }
View Full Code Here

Examples of org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments

           inclusiveNamespaces = new InclusiveNamespaces(inclusiveElement,
                   this._transformObject.getBaseURI()).getInclusiveNamespaces();
        }

        Canonicalizer20010315ExclWithComments c14n =
            new Canonicalizer20010315ExclWithComments();
         c14n.set_includeComments(!input.isExcludeComments());
        if (os!=null) {
           c14n.setWriter( os);
        }
        byte []result;
        if (input.isOctetStream()) {
           result=c14n.engineCanonicalize(input.getBytes());
        } else if (input.isElement()) {
                org.w3c.dom.Node excl=input.getExcludeNode();
                result =c14n
                           .engineCanonicalizeSubTree(input
                              .getSubNode(), inclusiveNamespaces
                              ,excl);
          }    else {
              result = c14n
                 .engineCanonicalizeXPathNodeSet(input
                    .getNodeSet(), inclusiveNamespaces
                    );     
          }
        XMLSignatureInput output=new XMLSignatureInput(result);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.