public Document build(Document doc, WSSecHeader secHeader) throws WSSecurityException, ConversationException { // // Setup the encrypted key // prepare(doc); envelope = doc.getDocumentElement(); // // prepend elements in the right order to the security header // prependDKElementToHeader(secHeader); String soapNamespace = WSSecurityUtil.getSOAPNamespace(envelope); if (parts == null) { parts = new ArrayList<WSEncryptionPart>(1); WSEncryptionPart encP = new WSEncryptionPart( WSConstants.ELEM_BODY, soapNamespace, "Content" ); parts.add(encP); } Element externRefList = encryptForExternalRef(null, parts); addExternalRefElement(externRefList, secHeader); return doc; }
public Document build(Document doc, WSSecHeader secHeader) throws WSSecurityException, ConversationException { // // Setup the encrypted key // prepare(doc); envelope = doc.getDocumentElement(); // // prepend elements in the right order to the security header // prependDKElementToHeader(secHeader); String soapNamespace = WSSecurityUtil.getSOAPNamespace(envelope); if (parts == null) { parts = new ArrayList<WSEncryptionPart>(1); WSEncryptionPart encP = new WSEncryptionPart( WSConstants.ELEM_BODY, soapNamespace, "Content" ); parts.add(encP); } Element externRefList = encryptForExternalRef(null, parts); addExternalRefElement(externRefList, secHeader); return doc; }
dkEncr.setSymmetricEncAlgorithm(algorithmSuite.getEncryption()); dkEncr.setDerivedKeyLength(algorithmSuite.getEncryptionDerivedKeyLength()/8); dkEncr.prepare(doc); encrDKTokenElem = dkEncr.getdktElement(); RampartUtil.appendChildToSecHeader(rmd, encrDKTokenElem);
this.encryptedKeyId); dkEncr.setDerivedKeyLength(rpd.getAlgorithmSuite().getEncryptionDerivedKeyLength()/8); dkEncr.prepare(doc);
dkEncr.setSymmetricEncAlgorithm(algorithmSuite.getEncryption()); dkEncr.setDerivedKeyLength(algorithmSuite.getEncryptionDerivedKeyLength()/8); dkEncr.prepare(doc);
dkEncr.prepare(doc); Element encrDKTokenElem = null; encrDKTokenElem = dkEncr.getdktElement();