Examples of Canonicalizer20010315ExclWithComments


Examples of com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclWithComments

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

        Canonicalizer20010315ExclWithComments c14n =
            new Canonicalizer20010315ExclWithComments();       
        if (os!=null) {
           c14n.setWriter( os);
        }
        input.setNeedsToBeExpanded(true);
        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 com.sun.org.apache.xml.internal.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 com.sun.org.apache.xml.internal.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 com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315ExclWithComments

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

        Canonicalizer20010315ExclWithComments c14n =
            new Canonicalizer20010315ExclWithComments();
        if (os!=null) {
           c14n.setWriter( os);
        }
        input.setNeedsToBeExpanded(true);
        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.axiom.c14n.impl.Canonicalizer20010315ExclWithComments

    public String toString() {
        return m_xml;
    }
    public static XMLLiteral parse(String lexicalForm) throws Exception {
        String enclosedXML="<arbitraryTag>"+lexicalForm+"</arbitraryTag>";
        Canonicalizer20010315ExclWithComments canonicalizer=new Canonicalizer20010315ExclWithComments();
        byte result[]=canonicalizer.engineCanonicalize(enclosedXML.getBytes("UTF-8"));
        String canonicalXML=new String(result,"UTF-8");
        assert canonicalXML.startsWith("<arbitraryTag>");
        assert canonicalXML.endsWith("</arbitraryTag>");
        canonicalXML=canonicalXML.substring("<arbitraryTag>".length(),canonicalXML.length()-"</arbitraryTag>".length());
        return new XMLLiteral(canonicalXML);
View Full Code Here

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

      Document doc =
         this.db
            .parse(getAbsolutePath("data/org/apache/xml/security/c14n/inExcl/example2_2_1.xml"));
      Node root = doc.getElementsByTagNameNS("http://example.net",
                                             "elem2").item(0);
      Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments();
      byte[] reference = JavaUtils.getBytesFromFile(getAbsolutePath(
         "data/org/apache/xml/security/c14n/inExcl/example2_2_c14nized_exclusive.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

      Document doc =
         this.db
            .parse(getAbsolutePath("data/org/apache/xml/security/c14n/inExcl/example2_2_2.xml"));
      Node root = doc.getElementsByTagNameNS("http://example.net",
                                             "elem2").item(0);
      Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments();
      byte[] reference = JavaUtils.getBytesFromFile(getAbsolutePath(
         "data/org/apache/xml/security/c14n/inExcl/example2_2_c14nized_exclusive.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

      Document doc =
         this.db
            .parse(getAbsolutePath("data/org/apache/xml/security/c14n/inExcl/example2_2_3.xml"));
      NodeList nodes = XPathAPI.selectNodeList(doc.getDocumentElement(),
                                 "(//. | //@* | //namespace::*)[ancestor-or-self::p]");
      Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments();
      byte[] reference = JavaUtils.getBytesFromFile(
          getAbsolutePath("data/org/apache/xml/security/c14n/inExcl/example2_2_3_c14nized_exclusive.xml") );
      byte[] result = c.engineCanonicalizeXPathNodeSet(nodes);
      assertEquals(new String(reference),new String(result));
   }
View Full Code Here

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

        Document doc =
            this.db.parse(getAbsolutePath("data/org/apache/xml/security/c14n/inExcl/example2_4.xml"));
        Node root =
            doc.getElementsByTagNameNS("http://example.net", "elem2").item(0);
        Canonicalizer20010315Excl c = new Canonicalizer20010315ExclWithComments();
        byte[] reference =
            JavaUtils.getBytesFromFile(getAbsolutePath(
                "data/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

        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(
                "data/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
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.