Examples of newTransform()


Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newTransform()

            DigestMethod method = signFactory.newDigestMethod(
                    DigestMethod.SHA1, null);
            Transform transform1 = signFactory.newTransform(
                    Transform.ENVELOPED,
                    (TransformParameterSpec) null);
            Transform transform2 = signFactory.newTransform(
                    CanonicalizationMethod.EXCLUSIVE,
                    (TransformParameterSpec) null);

            Reference ref = signFactory.newReference('#' + refId, method,
                    Arrays.asList(transform1, transform2), null, null);
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newTransform()

        final XMLSignatureFactory xsf = XMLSignatureFactory.getInstance("DOM");

        final Reference ref = xsf.newReference(
                "",
                xsf.newDigestMethod(DigestMethod.SHA256, null),
                Collections.singletonList(xsf.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null)),
                null,
                null);

        final SignedInfo si = xsf.newSignedInfo(xsf.newCanonicalizationMethod(CanonicalizationMethod.EXCLUSIVE,
                (C14NMethodParameterSpec) null),
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newTransform()

      //XMLSignatureFactory signFactory = XMLSignatureFactory.getInstance("DOM");
      XMLSignatureFactory signFactory = XMLSignatureFactory.getInstance();
      DigestMethod sha1DigestMethod = signFactory.newDigestMethod(DigestMethod.SHA1,null);
 
      List<Transform> transforms = new ArrayList<Transform>();
      transforms.add(signFactory.newTransform(Transform.ENVELOPED,(TransformParameterSpec)null));
      Map<String,String> m = new HashMap<String,String>();
      m.put("soap","http://schemas.xmlsoap.org/soap/envelope/");
      transforms.add(signFactory.newTransform(Transform.XPATH,new XPathFilterParameterSpec("not(ancestor-or-self::node()[@soap:actor=\"urn:oasis:names:tc:ebxml-msg:service:nextMSH\"]|ancestor-or-self::node()[@soap:actor=\"http://schemas.xmlsoap.org/soap/actor/next\"])",m)));
      transforms.add(signFactory.newTransform(CanonicalizationMethod.INCLUSIVE,(TransformParameterSpec)null));
 
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newTransform()

 
      List<Transform> transforms = new ArrayList<Transform>();
      transforms.add(signFactory.newTransform(Transform.ENVELOPED,(TransformParameterSpec)null));
      Map<String,String> m = new HashMap<String,String>();
      m.put("soap","http://schemas.xmlsoap.org/soap/envelope/");
      transforms.add(signFactory.newTransform(Transform.XPATH,new XPathFilterParameterSpec("not(ancestor-or-self::node()[@soap:actor=\"urn:oasis:names:tc:ebxml-msg:service:nextMSH\"]|ancestor-or-self::node()[@soap:actor=\"http://schemas.xmlsoap.org/soap/actor/next\"])",m)));
      transforms.add(signFactory.newTransform(CanonicalizationMethod.INCLUSIVE,(TransformParameterSpec)null));
 
      List<Reference> references = new ArrayList<Reference>();
      references.add(signFactory.newReference("",sha1DigestMethod,transforms,null,null));
 
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newTransform()

      List<Transform> transforms = new ArrayList<Transform>();
      transforms.add(signFactory.newTransform(Transform.ENVELOPED,(TransformParameterSpec)null));
      Map<String,String> m = new HashMap<String,String>();
      m.put("soap","http://schemas.xmlsoap.org/soap/envelope/");
      transforms.add(signFactory.newTransform(Transform.XPATH,new XPathFilterParameterSpec("not(ancestor-or-self::node()[@soap:actor=\"urn:oasis:names:tc:ebxml-msg:service:nextMSH\"]|ancestor-or-self::node()[@soap:actor=\"http://schemas.xmlsoap.org/soap/actor/next\"])",m)));
      transforms.add(signFactory.newTransform(CanonicalizationMethod.INCLUSIVE,(TransformParameterSpec)null));
 
      List<Reference> references = new ArrayList<Reference>();
      references.add(signFactory.newReference("",sha1DigestMethod,transforms,null,null));
 
      for (EbMSDataSource dataSource : dataSources)
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newTransform()

    // Step 2 : Create a Reference to the enveloped document (in this case,
    // you are signing the whole document, so a URI of "" signifies
    // that, and also specify the SHA256 digest algorithm and
    // the ENVELOPED Transform.
    Reference ref = fac.newReference("", fac.newDigestMethod(DigestMethod.SHA256, null), Collections.singletonList(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null)), null,
        null);

    // Step 3 : Create the SignedInfo.
    SignedInfo si = fac.newSignedInfo(fac.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE, (C14NMethodParameterSpec) null), fac.newSignatureMethod(SignatureMethod.DSA_SHA1, null),
        Collections.singletonList(ref));
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newTransform()

        try {
            Reference ref =fac.newReference(
                    "",
                    fac.newDigestMethod(DigestMethod.SHA1, null),
                    Collections.singletonList(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null)),
                    null,
                    null);
            SignedInfo si = fac.newSignedInfo(fac.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE,
                                                                            (C14NMethodParameterSpec) null),
                                              fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null),
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newTransform()

        try {
            Reference ref =fac.newReference(
                    "",
                    fac.newDigestMethod(DigestMethod.SHA1, null),
                    Collections.singletonList(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null)),
                    null,
                    null);
            SignedInfo si = fac.newSignedInfo(fac.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE,
                                                                            (C14NMethodParameterSpec) null),
                                              fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null),
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newTransform()

        // Create a Reference to the enveloped document (in this case,
        // you are signing the whole document, so a URI of "" signifies
        // that, and also specify the SHA1 digest algorithm and
        // the ENVELOPED Transform.
        Reference ref = fac.newReference("#" + referenceID, fac.newDigestMethod(DigestMethod.SHA1, null), Collections
            .singletonList(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec)null)), null, null);

        // Create the SignedInfo.
        SignedInfo si = fac.newSignedInfo(fac.newCanonicalizationMethod(CanonicalizationMethod.INCLUSIVE,
                                                                        (C14NMethodParameterSpec)null), fac
            .newSignatureMethod(SignatureMethod.RSA_SHA1, null), Collections.singletonList(ref));
View Full Code Here

Examples of javax.xml.crypto.dsig.XMLSignatureFactory.newTransform()

            final XMLSignatureFactory sigFactory = XMLSignatureFactory
                    .getInstance("DOM", (Provider) Class.forName(providerName)
                            .newInstance());

            final List<Transform> envelopedTransform = Collections
                    .singletonList(sigFactory.newTransform(Transform.ENVELOPED,
                            (TransformParameterSpec) null));

            final Reference ref = sigFactory.newReference("", sigFactory
                    .newDigestMethod(DigestMethod.SHA1, null), envelopedTransform,
                    null, null);
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.