Examples of EncryptionMethodType


Examples of com.sun.xml.security.core.xenc.EncryptionMethodType

        if(contentOnly){
            edt.setType(MessageConstants.ENCRYPT_ELEMENT_CONTENT);
        }else{
            edt.setType(MessageConstants.ENCRYPT_ELEMENT);
        }
        EncryptionMethodType emt = new EncryptionMethodType();
        emt.setAlgorithm(dataAlgo);
        edt.setEncryptionMethod(emt);
        CipherDataType ct = new CipherDataType();
        ct.setCipherValue("ed".getBytes());
        edt.setCipherData(ct);
        edt.setId(id);
View Full Code Here

Examples of com.sun.xml.security.core.xenc.EncryptionMethodType

            edt.setType(MessageConstants.SWA11_ATTACHMENT_CONTENT_ONLY);
        }else{
            edt.setType(MessageConstants.SWA11_ATTACHMENT_COMPLETE);
        }
        edt.setMimeType(attachment.getContentType());
        EncryptionMethodType emt = new EncryptionMethodType();
        emt.setAlgorithm(dataAlgo);
        edt.setEncryptionMethod(emt);
        CipherDataType ct = new CipherDataType();
        CipherReferenceType crt = new CipherReferenceType();
        crt.setURI(cid);
        TransformsType tst = new TransformsType();
View Full Code Here

Examples of com.sun.xml.security.core.xenc.EncryptionMethodType

            // TODO: not valid, need to throw exception here
            edt.setType(MessageConstants.ENCRYPT_ELEMENT_CONTENT);
        }else{
            edt.setType(MessageConstants.ENCRYPT_ELEMENT);
        }
        EncryptionMethodType emt = new EncryptionMethodType();
        emt.setAlgorithm(dataAlgo);
        edt.setEncryptionMethod(emt);
        CipherDataType ct = new CipherDataType();
        ct.setCipherValue("ed".getBytes());
        edt.setCipherData(ct);
        edt.setId(edId);
View Full Code Here

Examples of com.sun.xml.security.core.xenc.EncryptionMethodType

        return eh;
    }
   
    public EncryptedKey createEncryptedKey(String id , String keyEncAlgo,KeyInfo keyInfo,Key dkEK, Key dataEncKey) throws XWSSecurityException{
        EncryptedKeyType ekt = eoFactory.createEncryptedKeyType();
        EncryptionMethodType emt = eoFactory.createEncryptionMethodType();
        emt.setAlgorithm(keyEncAlgo);
        ekt.setEncryptionMethod(emt);
        ekt.setKeyInfo(keyInfo);
        CipherDataType ct = new CipherDataType();
        ct.setCipherValue("ek".getBytes());
        ekt.setCipherData(ct);
View Full Code Here

Examples of com.sun.xml.security.core.xenc.EncryptionMethodType

        if(contentOnly){
            edt.setType(MessageConstants.ENCRYPT_ELEMENT_CONTENT);
        }else{
            edt.setType(MessageConstants.ENCRYPT_ELEMENT);
        }
        final EncryptionMethodType emt = new EncryptionMethodType();
        emt.setAlgorithm(dataEncAlgo);
        edt.setEncryptionMethod(emt);
        final CipherDataType cipherType = new CipherDataType();
        cipherType.setCipherValue("ed".getBytes());
        edt.setCipherData(cipherType);
        edt.setId(id);
View Full Code Here

Examples of com.sun.xml.security.core.xenc.EncryptionMethodType

        if(contentOnly){
            edt.setType(MessageConstants.ENCRYPT_ELEMENT_CONTENT);
        }else{
            edt.setType(MessageConstants.ENCRYPT_ELEMENT);
        }
        EncryptionMethodType emt = new EncryptionMethodType();
        emt.setAlgorithm(dataAlgo);
        edt.setEncryptionMethod(emt);
        CipherDataType ct = new CipherDataType();
        ct.setCipherValue("ed".getBytes());
        edt.setCipherData(ct);
        edt.setId(id);
View Full Code Here

Examples of com.sun.xml.security.core.xenc.EncryptionMethodType

            edt.setType(MessageConstants.SWA11_ATTACHMENT_CONTENT_ONLY);
        }else{
            edt.setType(MessageConstants.SWA11_ATTACHMENT_COMPLETE);
        }
        edt.setMimeType(attachment.getContentType());
        EncryptionMethodType emt = new EncryptionMethodType();
        emt.setAlgorithm(dataAlgo);
        edt.setEncryptionMethod(emt);
        CipherDataType ct = new CipherDataType();
        CipherReferenceType crt = new CipherReferenceType();
        crt.setURI(cid);
        TransformsType tst = new TransformsType();
View Full Code Here

Examples of com.sun.xml.security.core.xenc.EncryptionMethodType

            // TODO: not valid, need to throw exception here
            edt.setType(MessageConstants.ENCRYPT_ELEMENT_CONTENT);
        }else{
            edt.setType(MessageConstants.ENCRYPT_ELEMENT);
        }
        EncryptionMethodType emt = new EncryptionMethodType();
        emt.setAlgorithm(dataAlgo);
        edt.setEncryptionMethod(emt);
        CipherDataType ct = new CipherDataType();
        ct.setCipherValue("ed".getBytes());
        edt.setCipherData(ct);
        edt.setId(edId);
View Full Code Here

Examples of com.sun.xml.security.core.xenc.EncryptionMethodType

        return eh;
    }
   
    public EncryptedKey createEncryptedKey(String id , String keyEncAlgo,KeyInfo keyInfo,Key dkEK, Key dataEncKey) throws XWSSecurityException{
        EncryptedKeyType ekt = eoFactory.createEncryptedKeyType();
        EncryptionMethodType emt = eoFactory.createEncryptionMethodType();
        emt.setAlgorithm(keyEncAlgo);
        ekt.setEncryptionMethod(emt);
        ekt.setKeyInfo(keyInfo);
        CipherDataType ct = new CipherDataType();
        ct.setCipherValue("ek".getBytes());
        ekt.setCipherData(ct);
View Full Code Here

Examples of org.apache.xml.security.binding.xmlenc.EncryptionMethodType

    @Override
    public void handle(InputProcessorChain inputProcessorChain, EncryptedKeyType encryptedKeyType, XMLSecEvent responsibleXMLSecStartXMLEvent, XMLSecurityProperties securityProperties) throws XMLSecurityException {
        checkBSPCompliance(inputProcessorChain, encryptedKeyType);
       
        // Check encryption algorithm against the required algorithm, if defined
        EncryptionMethodType encryptionMethodType = encryptedKeyType.getEncryptionMethod();
        if (securityProperties.getEncryptionKeyTransportAlgorithm() != null
            && encryptionMethodType != null) {
            String encryptionMethod = encryptionMethodType.getAlgorithm();
            if (!securityProperties.getEncryptionKeyTransportAlgorithm().equals(encryptionMethod)) {
                log.debug(
                    "The Key transport method does not match the requirement"
                );
                throw new WSSecurityException(WSSecurityException.ErrorCode.INVALID_SECURITY);
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.