Package org.apache.xml.security.stax.ext

Examples of org.apache.xml.security.stax.ext.SecurePart


        Key keyWrappingKey = rsaKeyPair.getPublic();
        String wrappingAlgorithm = "http://www.w3.org/2001/04/xmlenc#rsa-1_5";
        properties.setEncryptionKeyTransportAlgorithm(wrappingAlgorithm);
        properties.setEncryptionTransportKey(keyWrappingKey);
       
        SecurePart securePart =
               new SecurePart(new QName("urn:example:po", "PaymentInfo"), SecurePart.Modifier.Element);
        properties.addEncryptionPart(securePart);
       
        OutboundXMLSec outboundXMLSec = XMLSec.getOutboundXMLSec(properties);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter xmlStreamWriter = outboundXMLSec.processOutMessage(baos, "UTF-8");
View Full Code Here


        Key keyWrappingKey = rsaKeyPair.getPublic();
        String wrappingAlgorithm = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p";
        properties.setEncryptionKeyTransportAlgorithm(wrappingAlgorithm);
        properties.setEncryptionTransportKey(keyWrappingKey);
       
        SecurePart securePart =
               new SecurePart(new QName("urn:example:po", "PaymentInfo"), SecurePart.Modifier.Element);
        properties.addEncryptionPart(securePart);
       
        OutboundXMLSec outboundXMLSec = XMLSec.getOutboundXMLSec(properties);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter xmlStreamWriter = outboundXMLSec.processOutMessage(baos, "UTF-8");
View Full Code Here

        Key keyWrappingKey = rsaKeyPair.getPublic();
        String wrappingAlgorithm = "http://www.w3.org/2009/xmlenc11#rsa-oaep";
        properties.setEncryptionKeyTransportAlgorithm(wrappingAlgorithm);
        properties.setEncryptionTransportKey(keyWrappingKey);
       
        SecurePart securePart =
               new SecurePart(new QName("urn:example:po", "PaymentInfo"), SecurePart.Modifier.Element);
        properties.addEncryptionPart(securePart);
       
        OutboundXMLSec outboundXMLSec = XMLSec.getOutboundXMLSec(properties);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter xmlStreamWriter = outboundXMLSec.processOutMessage(baos, "UTF-8");
View Full Code Here

        SecretKey keyWrappingKey = keygen.generateKey();
        String wrappingAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#kw-camellia128";
        properties.setEncryptionKeyTransportAlgorithm(wrappingAlgorithm);
        properties.setEncryptionTransportKey(keyWrappingKey);
       
        SecurePart securePart =
               new SecurePart(new QName("urn:example:po", "PaymentInfo"), SecurePart.Modifier.Element);
        properties.addEncryptionPart(securePart);
       
        OutboundXMLSec outboundXMLSec = XMLSec.getOutboundXMLSec(properties);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter xmlStreamWriter = outboundXMLSec.processOutMessage(baos, "UTF-8");
View Full Code Here

        SecretKey keyWrappingKey = keygen.generateKey();
        String wrappingAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#kw-camellia192";
        properties.setEncryptionKeyTransportAlgorithm(wrappingAlgorithm);
        properties.setEncryptionTransportKey(keyWrappingKey);
       
        SecurePart securePart =
               new SecurePart(new QName("urn:example:po", "PaymentInfo"), SecurePart.Modifier.Element);
        properties.addEncryptionPart(securePart);
       
        OutboundXMLSec outboundXMLSec = XMLSec.getOutboundXMLSec(properties);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter xmlStreamWriter = outboundXMLSec.processOutMessage(baos, "UTF-8");
View Full Code Here

        SecretKey keyWrappingKey = keygen.generateKey();
        String wrappingAlgorithm = "http://www.w3.org/2001/04/xmldsig-more#kw-camellia256";
        properties.setEncryptionKeyTransportAlgorithm(wrappingAlgorithm);
        properties.setEncryptionTransportKey(keyWrappingKey);
       
        SecurePart securePart =
               new SecurePart(new QName("urn:example:po", "PaymentInfo"), SecurePart.Modifier.Element);
        properties.addEncryptionPart(securePart);
       
        OutboundXMLSec outboundXMLSec = XMLSec.getOutboundXMLSec(properties);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter xmlStreamWriter = outboundXMLSec.processOutMessage(baos, "UTF-8");
View Full Code Here

        SecretKey keyWrappingKey = keygen.generateKey();
        String wrappingAlgorithm = "http://www.w3.org/2007/05/xmldsig-more#kw-seed128";
        properties.setEncryptionKeyTransportAlgorithm(wrappingAlgorithm);
        properties.setEncryptionTransportKey(keyWrappingKey);
       
        SecurePart securePart =
               new SecurePart(new QName("urn:example:po", "PaymentInfo"), SecurePart.Modifier.Element);
        properties.addEncryptionPart(securePart);
       
        OutboundXMLSec outboundXMLSec = XMLSec.getOutboundXMLSec(properties);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XMLStreamWriter xmlStreamWriter = outboundXMLSec.processOutMessage(baos, "UTF-8");
View Full Code Here

        outSecurityProperties.setSignatureUser("transmitter");
        outSecurityProperties.setTokenUser("transmitter");
        outSecurityProperties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_NONE);
        outSecurityProperties.loadSignatureKeyStore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());

        outSecurityProperties.addEncryptionPart(new SecurePart(WSSConstants.TAG_soap11_Body, SecurePart.Modifier.Content));
        List<WSSConstants.Action> actions = new ArrayList<WSSConstants.Action>();
        actions.add(WSSConstants.USERNAMETOKEN);
        actions.add(WSSConstants.TIMESTAMP);
        actions.add(WSSConstants.ENCRYPT);
        outSecurityProperties.setActions(actions);
View Full Code Here

        outSecurityProperties.setSignatureUser("transmitter");
        outSecurityProperties.setTokenUser("transmitter");
        outSecurityProperties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_NONE);
        outSecurityProperties.loadSignatureKeyStore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());

        outSecurityProperties.addSignaturePart(new SecurePart(WSSConstants.TAG_soap11_Body, SecurePart.Modifier.Element));
        outSecurityProperties.addEncryptionPart(new SecurePart(WSSConstants.TAG_soap11_Body, SecurePart.Modifier.Content));
        List<WSSConstants.Action> actions = new ArrayList<WSSConstants.Action>();
        actions.add(WSSConstants.USERNAMETOKEN);
        actions.add(WSSConstants.TIMESTAMP);
        actions.add(WSSConstants.SIGNATURE);
        actions.add(WSSConstants.ENCRYPT);
View Full Code Here

        outSecurityProperties.setSignatureUser("transmitter");
        outSecurityProperties.setTokenUser("transmitter");
        outSecurityProperties.setUsernameTokenPasswordType(WSSConstants.UsernameTokenPasswordType.PASSWORD_NONE);
        outSecurityProperties.loadSignatureKeyStore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());

        outSecurityProperties.addSignaturePart(new SecurePart(WSSConstants.TAG_soap11_Body, SecurePart.Modifier.Element));
        outSecurityProperties.addEncryptionPart(new SecurePart(WSSConstants.TAG_soap11_Body, SecurePart.Modifier.Content));
        List<WSSConstants.Action> actions = new ArrayList<WSSConstants.Action>();
        actions.add(WSSConstants.USERNAMETOKEN);
        actions.add(WSSConstants.TIMESTAMP);
        actions.add(WSSConstants.SIGNATURE);
        actions.add(WSSConstants.ENCRYPT);
View Full Code Here

TOP

Related Classes of org.apache.xml.security.stax.ext.SecurePart

Copyright © 2018 www.massapicom. 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.