You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by co...@apache.org on 2009/04/20 15:56:38 UTC

svn commit: r766696 [23/36] - in /webservices/wss4j/site: ./ apidocs/ apidocs/org/apache/ws/axis/security/ apidocs/org/apache/ws/axis/security/class-use/ apidocs/org/apache/ws/axis/security/handler/ apidocs/org/apache/ws/axis/security/handler/class-use...

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDKEncrypt.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDKEncrypt.html?rev=766696&r1=766695&r2=766696&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDKEncrypt.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDKEncrypt.html Mon Apr 20 13:56:25 2009
@@ -137,7 +137,7 @@
 <a name="127" href="#127">127</a>             }
 <a name="128" href="#128">128</a> 
 <a name="129" href="#129">129</a>             <strong class="jxr_keyword">boolean</strong> content = modifier.equals(<span class="jxr_string">"Content"</span>) ? <strong class="jxr_keyword">true</strong> : false;
-<a name="130" href="#130">130</a>             String xencEncryptedDataId = <span class="jxr_string">"EncDataId-"</span> + body.hashCode();
+<a name="130" href="#130">130</a>             String xencEncryptedDataId = wssConfig.getIdAllocator().createId(<span class="jxr_string">"EncDataId-"</span>, body);
 <a name="131" href="#131">131</a> 
 <a name="132" href="#132">132</a>             <em class="jxr_comment">//</em>
 <a name="133" href="#133">133</a>             <em class="jxr_comment">// Fourth step: encrypt data, and set necessary attributes in</em>

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDKSign.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDKSign.html?rev=766696&r1=766695&r2=766696&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDKSign.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDKSign.html Mon Apr 20 13:56:25 2009
@@ -122,7 +122,7 @@
 <a name="112" href="#112">112</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> prepare(Document doc, <a href="../../../../../org/apache/ws/security/message/WSSecHeader.html">WSSecHeader</a> secHeader)
 <a name="113" href="#113">113</a>         <strong class="jxr_keyword">throws</strong> WSSecurityException, <a href="../../../../../org/apache/ws/security/conversation/ConversationException.html">ConversationException</a> {
 <a name="114" href="#114">114</a>         <strong class="jxr_keyword">super</strong>.prepare(doc);
-<a name="115" href="#115">115</a>         wsDocInfo = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSDocInfo.html">WSDocInfo</a>(doc.hashCode());
+<a name="115" href="#115">115</a>         wsDocInfo = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSDocInfo.html">WSDocInfo</a>(doc);
 <a name="116" href="#116">116</a>         
 <a name="117" href="#117">117</a>         <em class="jxr_comment">//</em>
 <a name="118" href="#118">118</a>         <em class="jxr_comment">// Get and initialize a XMLSignature element.</em>
@@ -160,15 +160,15 @@
 <a name="150" href="#150">150</a>         }
 <a name="151" href="#151">151</a>         
 <a name="152" href="#152">152</a>         sig.addResourceResolver(EnvelopeIdResolver.getInstance());
-<a name="153" href="#153">153</a>         String sigUri = <span class="jxr_string">"Signature-"</span> + sig.hashCode();
+<a name="153" href="#153">153</a>         String sigUri = wssConfig.getIdAllocator().createId(<span class="jxr_string">"Signature-"</span>, sig);
 <a name="154" href="#154">154</a>         sig.setId(sigUri);
 <a name="155" href="#155">155</a>         
 <a name="156" href="#156">156</a>         keyInfo = sig.getKeyInfo();
-<a name="157" href="#157">157</a>         keyInfoUri = <span class="jxr_string">"KeyId-"</span> + keyInfo.hashCode();
+<a name="157" href="#157">157</a>         keyInfoUri = wssConfig.getIdAllocator().createSecureId(<span class="jxr_string">"KeyId-"</span>, keyInfo);
 <a name="158" href="#158">158</a>         keyInfo.setId(keyInfoUri);
 <a name="159" href="#159">159</a>         
 <a name="160" href="#160">160</a>         secRef = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/SecurityTokenReference.html">SecurityTokenReference</a>(doc);
-<a name="161" href="#161">161</a>         strUri = <span class="jxr_string">"STRId-"</span> + secRef.hashCode();
+<a name="161" href="#161">161</a>         strUri = wssConfig.getIdAllocator().createSecureId(<span class="jxr_string">"STRId-"</span>, secRef);
 <a name="162" href="#162">162</a>         secRef.setID(strUri);
 <a name="163" href="#163">163</a>         
 <a name="164" href="#164">164</a>         <a href="../../../../../org/apache/ws/security/message/token/Reference.html">Reference</a> refUt = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/Reference.html">Reference</a>(document);
@@ -421,7 +421,7 @@
 <a name="411" href="#411">411</a> <em class="jxr_javadoccomment">     * @throws WSSecurityException</em>
 <a name="412" href="#412">412</a> <em class="jxr_javadoccomment">     */</em>
 <a name="413" href="#413">413</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> computeSignature() <strong class="jxr_keyword">throws</strong> WSSecurityException {
-<a name="414" href="#414">414</a>         WSDocInfoStore.store(wsDocInfo);
+<a name="414" href="#414">414</a>         <strong class="jxr_keyword">boolean</strong> remove = WSDocInfoStore.store(wsDocInfo);
 <a name="415" href="#415">415</a>         <strong class="jxr_keyword">try</strong> {
 <a name="416" href="#416">416</a>             sig.sign(sig.createSecretKey(derivedKeyBytes));
 <a name="417" href="#417">417</a>             signatureValue = sig.getSignatureValue();
@@ -434,60 +434,62 @@
 <a name="424" href="#424">424</a>                 WSSecurityException.FAILED_SIGNATURE, <strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>, e1
 <a name="425" href="#425">425</a>             );
 <a name="426" href="#426">426</a>         } <strong class="jxr_keyword">finally</strong> {
-<a name="427" href="#427">427</a>             WSDocInfoStore.delete(wsDocInfo);
-<a name="428" href="#428">428</a>         }
-<a name="429" href="#429">429</a>     }
-<a name="430" href="#430">430</a>     
-<a name="431" href="#431">431</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="432" href="#432">432</a> <em class="jxr_javadoccomment">     * @see org.apache.ws.security.message.WSSecDerivedKeyBase#getDerivedKeyLength()</em>
-<a name="433" href="#433">433</a> <em class="jxr_javadoccomment">     */</em>
-<a name="434" href="#434">434</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">int</strong> getDerivedKeyLength() <strong class="jxr_keyword">throws</strong> WSSecurityException {
-<a name="435" href="#435">435</a>         <strong class="jxr_keyword">return</strong> (<strong class="jxr_keyword">this</strong>.derivedKeyLength &gt; 0) ? <strong class="jxr_keyword">this</strong>.derivedKeyLength : 
-<a name="436" href="#436">436</a>             WSSecurityUtil.getKeyLength(<strong class="jxr_keyword">this</strong>.sigAlgo);
-<a name="437" href="#437">437</a>     }
-<a name="438" href="#438">438</a>     
-<a name="439" href="#439">439</a>     
-<a name="440" href="#440">440</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setSignatureAlgorithm(String algo) {
-<a name="441" href="#441">441</a>         <strong class="jxr_keyword">this</strong>.sigAlgo = algo;
-<a name="442" href="#442">442</a>     }
-<a name="443" href="#443">443</a> 
-<a name="444" href="#444">444</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="445" href="#445">445</a> <em class="jxr_javadoccomment">     * @return Returns the signatureValue.</em>
-<a name="446" href="#446">446</a> <em class="jxr_javadoccomment">     */</em>
-<a name="447" href="#447">447</a>     <strong class="jxr_keyword">public</strong> byte[] getSignatureValue() {
-<a name="448" href="#448">448</a>         <strong class="jxr_keyword">return</strong> signatureValue;
-<a name="449" href="#449">449</a>     }
-<a name="450" href="#450">450</a>     
-<a name="451" href="#451">451</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="452" href="#452">452</a> <em class="jxr_javadoccomment">     * Set the canonicalization method to use.</em>
-<a name="453" href="#453">453</a> <em class="jxr_javadoccomment">     * </em>
-<a name="454" href="#454">454</a> <em class="jxr_javadoccomment">     * If the canonicalization method is not set then the recommended Exclusive</em>
-<a name="455" href="#455">455</a> <em class="jxr_javadoccomment">     * XML Canonicalization is used by default Refer to WSConstants which</em>
-<a name="456" href="#456">456</a> <em class="jxr_javadoccomment">     * algorithms are supported.</em>
-<a name="457" href="#457">457</a> <em class="jxr_javadoccomment">     * </em>
-<a name="458" href="#458">458</a> <em class="jxr_javadoccomment">     * @param algo Is the name of the signature algorithm</em>
-<a name="459" href="#459">459</a> <em class="jxr_javadoccomment">     * @see WSConstants#C14N_OMIT_COMMENTS</em>
-<a name="460" href="#460">460</a> <em class="jxr_javadoccomment">     * @see WSConstants#C14N_WITH_COMMENTS</em>
-<a name="461" href="#461">461</a> <em class="jxr_javadoccomment">     * @see WSConstants#C14N_EXCL_OMIT_COMMENTS</em>
-<a name="462" href="#462">462</a> <em class="jxr_javadoccomment">     * @see WSConstants#C14N_EXCL_WITH_COMMENTS</em>
-<a name="463" href="#463">463</a> <em class="jxr_javadoccomment">     */</em>
-<a name="464" href="#464">464</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setSigCanonicalization(String algo) {
-<a name="465" href="#465">465</a>         canonAlgo = algo;
-<a name="466" href="#466">466</a>     }
-<a name="467" href="#467">467</a> 
-<a name="468" href="#468">468</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="469" href="#469">469</a> <em class="jxr_javadoccomment">     * Get the canonicalization method.</em>
-<a name="470" href="#470">470</a> <em class="jxr_javadoccomment">     * </em>
-<a name="471" href="#471">471</a> <em class="jxr_javadoccomment">     * If the canonicalization method was not set then Exclusive XML</em>
-<a name="472" href="#472">472</a> <em class="jxr_javadoccomment">     * Canonicalization is used by default.</em>
-<a name="473" href="#473">473</a> <em class="jxr_javadoccomment">     * </em>
-<a name="474" href="#474">474</a> <em class="jxr_javadoccomment">     * @return The string describing the canonicalization algorithm.</em>
-<a name="475" href="#475">475</a> <em class="jxr_javadoccomment">     */</em>
-<a name="476" href="#476">476</a>     <strong class="jxr_keyword">public</strong> String getSigCanonicalization() {
-<a name="477" href="#477">477</a>         <strong class="jxr_keyword">return</strong> canonAlgo;
-<a name="478" href="#478">478</a>     }
-<a name="479" href="#479">479</a> 
-<a name="480" href="#480">480</a> }
+<a name="427" href="#427">427</a>             <strong class="jxr_keyword">if</strong> (remove) {
+<a name="428" href="#428">428</a>                 WSDocInfoStore.delete(wsDocInfo);
+<a name="429" href="#429">429</a>             }
+<a name="430" href="#430">430</a>         }
+<a name="431" href="#431">431</a>     }
+<a name="432" href="#432">432</a>     
+<a name="433" href="#433">433</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="434" href="#434">434</a> <em class="jxr_javadoccomment">     * @see org.apache.ws.security.message.WSSecDerivedKeyBase#getDerivedKeyLength()</em>
+<a name="435" href="#435">435</a> <em class="jxr_javadoccomment">     */</em>
+<a name="436" href="#436">436</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">int</strong> getDerivedKeyLength() <strong class="jxr_keyword">throws</strong> WSSecurityException {
+<a name="437" href="#437">437</a>         <strong class="jxr_keyword">return</strong> (<strong class="jxr_keyword">this</strong>.derivedKeyLength &gt; 0) ? <strong class="jxr_keyword">this</strong>.derivedKeyLength : 
+<a name="438" href="#438">438</a>             WSSecurityUtil.getKeyLength(<strong class="jxr_keyword">this</strong>.sigAlgo);
+<a name="439" href="#439">439</a>     }
+<a name="440" href="#440">440</a>     
+<a name="441" href="#441">441</a>     
+<a name="442" href="#442">442</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setSignatureAlgorithm(String algo) {
+<a name="443" href="#443">443</a>         <strong class="jxr_keyword">this</strong>.sigAlgo = algo;
+<a name="444" href="#444">444</a>     }
+<a name="445" href="#445">445</a> 
+<a name="446" href="#446">446</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="447" href="#447">447</a> <em class="jxr_javadoccomment">     * @return Returns the signatureValue.</em>
+<a name="448" href="#448">448</a> <em class="jxr_javadoccomment">     */</em>
+<a name="449" href="#449">449</a>     <strong class="jxr_keyword">public</strong> byte[] getSignatureValue() {
+<a name="450" href="#450">450</a>         <strong class="jxr_keyword">return</strong> signatureValue;
+<a name="451" href="#451">451</a>     }
+<a name="452" href="#452">452</a>     
+<a name="453" href="#453">453</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="454" href="#454">454</a> <em class="jxr_javadoccomment">     * Set the canonicalization method to use.</em>
+<a name="455" href="#455">455</a> <em class="jxr_javadoccomment">     * </em>
+<a name="456" href="#456">456</a> <em class="jxr_javadoccomment">     * If the canonicalization method is not set then the recommended Exclusive</em>
+<a name="457" href="#457">457</a> <em class="jxr_javadoccomment">     * XML Canonicalization is used by default Refer to WSConstants which</em>
+<a name="458" href="#458">458</a> <em class="jxr_javadoccomment">     * algorithms are supported.</em>
+<a name="459" href="#459">459</a> <em class="jxr_javadoccomment">     * </em>
+<a name="460" href="#460">460</a> <em class="jxr_javadoccomment">     * @param algo Is the name of the signature algorithm</em>
+<a name="461" href="#461">461</a> <em class="jxr_javadoccomment">     * @see WSConstants#C14N_OMIT_COMMENTS</em>
+<a name="462" href="#462">462</a> <em class="jxr_javadoccomment">     * @see WSConstants#C14N_WITH_COMMENTS</em>
+<a name="463" href="#463">463</a> <em class="jxr_javadoccomment">     * @see WSConstants#C14N_EXCL_OMIT_COMMENTS</em>
+<a name="464" href="#464">464</a> <em class="jxr_javadoccomment">     * @see WSConstants#C14N_EXCL_WITH_COMMENTS</em>
+<a name="465" href="#465">465</a> <em class="jxr_javadoccomment">     */</em>
+<a name="466" href="#466">466</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setSigCanonicalization(String algo) {
+<a name="467" href="#467">467</a>         canonAlgo = algo;
+<a name="468" href="#468">468</a>     }
+<a name="469" href="#469">469</a> 
+<a name="470" href="#470">470</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="471" href="#471">471</a> <em class="jxr_javadoccomment">     * Get the canonicalization method.</em>
+<a name="472" href="#472">472</a> <em class="jxr_javadoccomment">     * </em>
+<a name="473" href="#473">473</a> <em class="jxr_javadoccomment">     * If the canonicalization method was not set then Exclusive XML</em>
+<a name="474" href="#474">474</a> <em class="jxr_javadoccomment">     * Canonicalization is used by default.</em>
+<a name="475" href="#475">475</a> <em class="jxr_javadoccomment">     * </em>
+<a name="476" href="#476">476</a> <em class="jxr_javadoccomment">     * @return The string describing the canonicalization algorithm.</em>
+<a name="477" href="#477">477</a> <em class="jxr_javadoccomment">     */</em>
+<a name="478" href="#478">478</a>     <strong class="jxr_keyword">public</strong> String getSigCanonicalization() {
+<a name="479" href="#479">479</a>         <strong class="jxr_keyword">return</strong> canonAlgo;
+<a name="480" href="#480">480</a>     }
+<a name="481" href="#481">481</a> 
+<a name="482" href="#482">482</a> }
 </pre>
 <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
 </html>

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDerivedKeyBase.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDerivedKeyBase.html?rev=766696&r1=766695&r2=766696&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDerivedKeyBase.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecDerivedKeyBase.html Mon Apr 20 13:56:25 2009
@@ -205,7 +205,7 @@
 <a name="195" href="#195">195</a>         
 <a name="196" href="#196">196</a>         <em class="jxr_comment">// Add the DKTs</em>
 <a name="197" href="#197">197</a>         dkt = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/DerivedKeyToken.html">DerivedKeyToken</a>(<strong class="jxr_keyword">this</strong>.wscVersion, document);
-<a name="198" href="#198">198</a>         dktId = <span class="jxr_string">"derivedKeyId-"</span> + dkt.hashCode();
+<a name="198" href="#198">198</a>         dktId = wssConfig.getIdAllocator().createId(<span class="jxr_string">"derivedKeyId-"</span>, dkt);
 <a name="199" href="#199">199</a>         
 <a name="200" href="#200">200</a>         dkt.setOffset(offset);
 <a name="201" href="#201">201</a>         dkt.setLength(length);

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecEncrypt.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecEncrypt.html?rev=766696&r1=766695&r2=766696&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecEncrypt.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecEncrypt.html Mon Apr 20 13:56:25 2009
@@ -505,7 +505,7 @@
 <a name="495" href="#495">495</a>             }
 <a name="496" href="#496">496</a> 
 <a name="497" href="#497">497</a>             <strong class="jxr_keyword">boolean</strong> content = modifier.equals(<span class="jxr_string">"Content"</span>) ? <strong class="jxr_keyword">true</strong> : false;
-<a name="498" href="#498">498</a>             String xencEncryptedDataId = <span class="jxr_string">"EncDataId-"</span> + body.hashCode();
+<a name="498" href="#498">498</a>             String xencEncryptedDataId = wssConfig.getIdAllocator().createId(<span class="jxr_string">"EncDataId-"</span>, body);
 <a name="499" href="#499">499</a>             encPart.setEncId(xencEncryptedDataId);
 <a name="500" href="#500">500</a> 
 <a name="501" href="#501">501</a>             cloneKeyInfo = <strong class="jxr_keyword">true</strong>;
@@ -544,265 +544,266 @@
 <a name="534" href="#534">534</a>                     String wsuPrefix = 
 <a name="535" href="#535">535</a>                         WSSecurityUtil.setNamespace(elem, WSConstants.WSU_NS, WSConstants.WSU_PREFIX);
 <a name="536" href="#536">536</a>                     elem.setAttributeNS(
-<a name="537" href="#537">537</a>                         WSConstants.WSU_NS, wsuPrefix + <span class="jxr_string">":Id"</span>, <span class="jxr_string">"EncHeader-"</span> + body.hashCode()
-<a name="538" href="#538">538</a>                     );
-<a name="539" href="#539">539</a>                     
-<a name="540" href="#540">540</a>                     NamedNodeMap map = body.getAttributes();
-<a name="541" href="#541">541</a>                     
-<a name="542" href="#542">542</a>                     <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0 ; i &lt; map.getLength() ; i++) {
-<a name="543" href="#543">543</a>                         Attr attr = (Attr)map.item(i);
-<a name="544" href="#544">544</a>                         <strong class="jxr_keyword">if</strong> (attr.getNamespaceURI().equals(WSConstants.URI_SOAP11_ENV)
-<a name="545" href="#545">545</a>                             || attr.getNamespaceURI().equals(WSConstants.URI_SOAP12_ENV)) {                         
-<a name="546" href="#546">546</a>                             String soapEnvPrefix = 
-<a name="547" href="#547">547</a>                                 WSSecurityUtil.setNamespace(
-<a name="548" href="#548">548</a>                                     elem, attr.getNamespaceURI(), WSConstants.DEFAULT_SOAP_PREFIX
-<a name="549" href="#549">549</a>                                 );
-<a name="550" href="#550">550</a>                             elem.setAttributeNS(
-<a name="551" href="#551">551</a>                                 attr.getNamespaceURI(), 
-<a name="552" href="#552">552</a>                                 soapEnvPrefix + <span class="jxr_string">":"</span> + attr.getLocalName(), 
-<a name="553" href="#553">553</a>                                 attr.getValue()
-<a name="554" href="#554">554</a>                             );
-<a name="555" href="#555">555</a>                         }
-<a name="556" href="#556">556</a>                     }
-<a name="557" href="#557">557</a>                     
-<a name="558" href="#558">558</a>                     xmlCipher.init(XMLCipher.ENCRYPT_MODE, secretKey);
-<a name="559" href="#559">559</a>                     EncryptedData encData = xmlCipher.getEncryptedData();
-<a name="560" href="#560">560</a>                     encData.setId(xencEncryptedDataId);
-<a name="561" href="#561">561</a>                     encData.setKeyInfo(keyInfo);
-<a name="562" href="#562">562</a>                     xmlCipher.doFinal(doc, body, content);
-<a name="563" href="#563">563</a>                     
-<a name="564" href="#564">564</a>                     Element encDataElem = 
-<a name="565" href="#565">565</a>                         WSSecurityUtil.findElementById(
-<a name="566" href="#566">566</a>                             document.getDocumentElement(), xencEncryptedDataId, <strong class="jxr_keyword">null</strong>
-<a name="567" href="#567">567</a>                         );
-<a name="568" href="#568">568</a>                     Node clone = encDataElem.cloneNode(<strong class="jxr_keyword">true</strong>);
-<a name="569" href="#569">569</a>                     elem.appendChild(clone);
-<a name="570" href="#570">570</a>                     encDataElem.getParentNode().appendChild(elem);
-<a name="571" href="#571">571</a>                     encDataElem.getParentNode().removeChild(encDataElem); 
-<a name="572" href="#572">572</a>                 } <strong class="jxr_keyword">else</strong> {
-<a name="573" href="#573">573</a>                     xmlCipher.init(XMLCipher.ENCRYPT_MODE, secretKey);
-<a name="574" href="#574">574</a>                     EncryptedData encData = xmlCipher.getEncryptedData();
-<a name="575" href="#575">575</a>                     encData.setId(xencEncryptedDataId);
-<a name="576" href="#576">576</a>                     encData.setKeyInfo(keyInfo);
-<a name="577" href="#577">577</a>                     xmlCipher.doFinal(doc, body, content);          
-<a name="578" href="#578">578</a>                 }
-<a name="579" href="#579">579</a>                 <strong class="jxr_keyword">if</strong> (cloneKeyInfo) {
-<a name="580" href="#580">580</a>                     keyInfo = <strong class="jxr_keyword">new</strong> KeyInfo((Element) keyInfo.getElement().cloneNode(<strong class="jxr_keyword">true</strong>), <strong class="jxr_keyword">null</strong>);
-<a name="581" href="#581">581</a>                 }
-<a name="582" href="#582">582</a>             } <strong class="jxr_keyword">catch</strong> (Exception e2) {
-<a name="583" href="#583">583</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
-<a name="584" href="#584">584</a>                     WSSecurityException.FAILED_ENCRYPTION, <strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>, e2
-<a name="585" href="#585">585</a>                 );
-<a name="586" href="#586">586</a>             }
-<a name="587" href="#587">587</a>             encDataRef.add(<strong class="jxr_keyword">new</strong> String(<span class="jxr_string">"#"</span> + xencEncryptedDataId));
-<a name="588" href="#588">588</a>         }
-<a name="589" href="#589">589</a>         <strong class="jxr_keyword">return</strong> encDataRef;
-<a name="590" href="#590">590</a>     }
-<a name="591" href="#591">591</a> 
-<a name="592" href="#592">592</a>     <strong class="jxr_keyword">private</strong> Document buildEmbedded(Document doc, <a href="../../../../../org/apache/ws/security/message/WSSecHeader.html">WSSecHeader</a> secHeader) 
-<a name="593" href="#593">593</a>         <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> {
-<a name="594" href="#594">594</a>         doDebug = log.isDebugEnabled();
-<a name="595" href="#595">595</a> 
-<a name="596" href="#596">596</a>         <strong class="jxr_keyword">if</strong> (doDebug) {
-<a name="597" href="#597">597</a>             log.debug(<span class="jxr_string">"Beginning Encryption embedded..."</span>);
-<a name="598" href="#598">598</a>         }
-<a name="599" href="#599">599</a>         envelope = doc.getDocumentElement();
-<a name="600" href="#600">600</a>         envelope.setAttributeNS(
-<a name="601" href="#601">601</a>             WSConstants.XMLNS_NS, <span class="jxr_string">"xmlns:"</span> + WSConstants.ENC_PREFIX, WSConstants.ENC_NS
-<a name="602" href="#602">602</a>         );
-<a name="603" href="#603">603</a> 
-<a name="604" href="#604">604</a>         <em class="jxr_comment">//</em>
-<a name="605" href="#605">605</a>         <em class="jxr_comment">// Second step: generate a symmetric key from the specified key</em>
-<a name="606" href="#606">606</a>         <em class="jxr_comment">// (password) for this algorithm, and set the cipher into encryption</em>
-<a name="607" href="#607">607</a>         <em class="jxr_comment">// mode.</em>
-<a name="608" href="#608">608</a>         <em class="jxr_comment">//</em>
-<a name="609" href="#609">609</a>         <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.symmetricKey == <strong class="jxr_keyword">null</strong>) {
-<a name="610" href="#610">610</a>             <strong class="jxr_keyword">if</strong> (embeddedKey == <strong class="jxr_keyword">null</strong>) {
-<a name="611" href="#611">611</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(WSSecurityException.FAILURE, <span class="jxr_string">"noKeySupplied"</span>);
-<a name="612" href="#612">612</a>             }
-<a name="613" href="#613">613</a>             <strong class="jxr_keyword">this</strong>.symmetricKey = WSSecurityUtil.prepareSecretKey(symEncAlgo, embeddedKey);
-<a name="614" href="#614">614</a>         }
-<a name="615" href="#615">615</a> 
-<a name="616" href="#616">616</a>         KeyInfo keyInfo = <strong class="jxr_keyword">null</strong>;
-<a name="617" href="#617">617</a>         <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.keyIdentifierType == WSConstants.EMBEDDED_KEYNAME) {
-<a name="618" href="#618">618</a>             keyInfo = <strong class="jxr_keyword">new</strong> KeyInfo(doc);
-<a name="619" href="#619">619</a>             keyInfo.addKeyName(embeddedKeyName == <strong class="jxr_keyword">null</strong> ? user : embeddedKeyName);
-<a name="620" href="#620">620</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.keyIdentifierType == WSConstants.EMBED_SECURITY_TOKEN_REF) {
-<a name="621" href="#621">621</a>             <em class="jxr_comment">//</em>
-<a name="622" href="#622">622</a>             <em class="jxr_comment">// This means that we want to embed a &lt;wsse:SecurityTokenReference&gt;</em>
-<a name="623" href="#623">623</a>             <em class="jxr_comment">// into keyInfo element. If we need this functionality, this.secRef</em>
-<a name="624" href="#624">624</a>             <em class="jxr_comment">// MUST be set before calling the build(doc, crypto) method. So if</em>
-<a name="625" href="#625">625</a>             <em class="jxr_comment">// secRef is null then throw an exception.</em>
-<a name="626" href="#626">626</a>             <em class="jxr_comment">//</em>
-<a name="627" href="#627">627</a>             <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.securityTokenReference == <strong class="jxr_keyword">null</strong>) {
-<a name="628" href="#628">628</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
-<a name="629" href="#629">629</a>                     WSSecurityException.SECURITY_TOKEN_UNAVAILABLE,
-<a name="630" href="#630">630</a>                     <span class="jxr_string">"You must set keyInfo element, if the keyIdentifier == EMBED_SECURITY_TOKEN_REF"</span>
-<a name="631" href="#631">631</a>                  );
-<a name="632" href="#632">632</a>             } <strong class="jxr_keyword">else</strong> {
-<a name="633" href="#633">633</a>                 keyInfo = <strong class="jxr_keyword">new</strong> KeyInfo(doc);
-<a name="634" href="#634">634</a>                 Element tmpE = securityTokenReference.getElement();
-<a name="635" href="#635">635</a>                 tmpE.setAttributeNS(
-<a name="636" href="#636">636</a>                     WSConstants.XMLNS_NS, <span class="jxr_string">"xmlns:"</span> + tmpE.getPrefix(), tmpE.getNamespaceURI()
-<a name="637" href="#637">637</a>                 );
-<a name="638" href="#638">638</a>                 keyInfo.addUnknownElement(securityTokenReference.getElement());
-<a name="639" href="#639">639</a>             }
-<a name="640" href="#640">640</a>         }
-<a name="641" href="#641">641</a>         Element keyInfoElement = keyInfo.getElement();
-<a name="642" href="#642">642</a>         keyInfoElement.setAttributeNS(
-<a name="643" href="#643">643</a>             WSConstants.XMLNS_NS, <span class="jxr_string">"xmlns:"</span> + WSConstants.SIG_PREFIX, WSConstants.SIG_NS
-<a name="644" href="#644">644</a>         );
-<a name="645" href="#645">645</a> 
-<a name="646" href="#646">646</a>         <a href="../../../../../org/apache/ws/security/SOAPConstants.html">SOAPConstants</a> soapConstants = WSSecurityUtil.getSOAPConstants(envelope);
-<a name="647" href="#647">647</a>         <strong class="jxr_keyword">if</strong> (parts == <strong class="jxr_keyword">null</strong>) {
-<a name="648" href="#648">648</a>             parts = <strong class="jxr_keyword">new</strong> Vector();
-<a name="649" href="#649">649</a>             <a href="../../../../../org/apache/ws/security/WSEncryptionPart.html">WSEncryptionPart</a> encP = 
-<a name="650" href="#650">650</a>                 <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSEncryptionPart.html">WSEncryptionPart</a>(
-<a name="651" href="#651">651</a>                     soapConstants.getBodyQName().getLocalPart(), 
-<a name="652" href="#652">652</a>                     soapConstants.getEnvelopeURI(), 
-<a name="653" href="#653">653</a>                     <span class="jxr_string">"Content"</span>
-<a name="654" href="#654">654</a>                 );
-<a name="655" href="#655">655</a>             parts.add(encP);
-<a name="656" href="#656">656</a>         }
-<a name="657" href="#657">657</a>         Vector encDataRefs = doEncryption(doc, <strong class="jxr_keyword">this</strong>.symmetricKey, keyInfo, parts);
-<a name="658" href="#658">658</a> 
-<a name="659" href="#659">659</a>         <em class="jxr_comment">//</em>
-<a name="660" href="#660">660</a>         <em class="jxr_comment">// At this point data is encrypted with the symmetric key and can be</em>
-<a name="661" href="#661">661</a>         <em class="jxr_comment">// referenced via the above Id</em>
-<a name="662" href="#662">662</a>         <em class="jxr_comment">//</em>
-<a name="663" href="#663">663</a> 
-<a name="664" href="#664">664</a>         <em class="jxr_comment">//</em>
-<a name="665" href="#665">665</a>         <em class="jxr_comment">// Now we need to setup the wsse:Security header block 1) get (or</em>
-<a name="666" href="#666">666</a>         <em class="jxr_comment">// create) the wsse:Security header block 2) The last step sets up the</em>
-<a name="667" href="#667">667</a>         <em class="jxr_comment">// reference list that pints to the encrypted data</em>
-<a name="668" href="#668">668</a>         <em class="jxr_comment">//</em>
-<a name="669" href="#669">669</a>         Element wsseSecurity = secHeader.getSecurityHeader();
-<a name="670" href="#670">670</a> 
-<a name="671" href="#671">671</a>         Element referenceList = 
-<a name="672" href="#672">672</a>             doc.createElementNS(WSConstants.ENC_NS, WSConstants.ENC_PREFIX + <span class="jxr_string">":ReferenceList"</span>);
-<a name="673" href="#673">673</a>         referenceList = createDataRefList(doc, referenceList, encDataRefs);
-<a name="674" href="#674">674</a>         WSSecurityUtil.prependChildElement(wsseSecurity, referenceList);
-<a name="675" href="#675">675</a> 
-<a name="676" href="#676">676</a>         <strong class="jxr_keyword">return</strong> doc;
-<a name="677" href="#677">677</a>     }
-<a name="678" href="#678">678</a> 
-<a name="679" href="#679">679</a>     <strong class="jxr_keyword">private</strong> KeyGenerator getKeyGenerator() <strong class="jxr_keyword">throws</strong> WSSecurityException {
-<a name="680" href="#680">680</a>         KeyGenerator keyGen = <strong class="jxr_keyword">null</strong>;
-<a name="681" href="#681">681</a>         <strong class="jxr_keyword">try</strong> {
-<a name="682" href="#682">682</a>             <em class="jxr_comment">//</em>
-<a name="683" href="#683">683</a>             <em class="jxr_comment">// Assume AES as default, so initialize it</em>
-<a name="684" href="#684">684</a>             <em class="jxr_comment">//</em>
-<a name="685" href="#685">685</a>             keyGen = KeyGenerator.getInstance(<span class="jxr_string">"AES"</span>);
-<a name="686" href="#686">686</a>             <strong class="jxr_keyword">if</strong> (symEncAlgo.equalsIgnoreCase(WSConstants.TRIPLE_DES)) {
-<a name="687" href="#687">687</a>                 keyGen = KeyGenerator.getInstance(<span class="jxr_string">"DESede"</span>);
-<a name="688" href="#688">688</a>             } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (symEncAlgo.equalsIgnoreCase(WSConstants.AES_128)) {
-<a name="689" href="#689">689</a>                 keyGen.init(128);
-<a name="690" href="#690">690</a>             } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (symEncAlgo.equalsIgnoreCase(WSConstants.AES_192)) {
-<a name="691" href="#691">691</a>                 keyGen.init(192);
-<a name="692" href="#692">692</a>             } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (symEncAlgo.equalsIgnoreCase(WSConstants.AES_256)) {
-<a name="693" href="#693">693</a>                 keyGen.init(256);
-<a name="694" href="#694">694</a>             } <strong class="jxr_keyword">else</strong> {
-<a name="695" href="#695">695</a>                 <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
-<a name="696" href="#696">696</a>             }
-<a name="697" href="#697">697</a>         } <strong class="jxr_keyword">catch</strong> (NoSuchAlgorithmException e) {
-<a name="698" href="#698">698</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
-<a name="699" href="#699">699</a>                 WSSecurityException.UNSUPPORTED_ALGORITHM, <strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>, e
-<a name="700" href="#700">700</a>             );
-<a name="701" href="#701">701</a>         }
-<a name="702" href="#702">702</a>         <strong class="jxr_keyword">return</strong> keyGen;
-<a name="703" href="#703">703</a>     }
-<a name="704" href="#704">704</a> 
-<a name="705" href="#705">705</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="706" href="#706">706</a> <em class="jxr_javadoccomment">     * Create DOM subtree for &lt;code&gt;xenc:EncryptedKey&lt;/code&gt;</em>
-<a name="707" href="#707">707</a> <em class="jxr_javadoccomment">     * </em>
-<a name="708" href="#708">708</a> <em class="jxr_javadoccomment">     * @param doc the SOAP envelope parent document</em>
-<a name="709" href="#709">709</a> <em class="jxr_javadoccomment">     * @param referenceList</em>
-<a name="710" href="#710">710</a> <em class="jxr_javadoccomment">     * @param encDataRefs</em>
-<a name="711" href="#711">711</a> <em class="jxr_javadoccomment">     * @return an &lt;code&gt;xenc:EncryptedKey&lt;/code&gt; element</em>
-<a name="712" href="#712">712</a> <em class="jxr_javadoccomment">     */</em>
-<a name="713" href="#713">713</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> Element createDataRefList(
-<a name="714" href="#714">714</a>         Document doc,
-<a name="715" href="#715">715</a>         Element referenceList, 
-<a name="716" href="#716">716</a>         Vector encDataRefs
-<a name="717" href="#717">717</a>     ) {
-<a name="718" href="#718">718</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; encDataRefs.size(); i++) {
-<a name="719" href="#719">719</a>             String dataReferenceUri = (String) encDataRefs.get(i);
-<a name="720" href="#720">720</a>             Element dataReference = 
-<a name="721" href="#721">721</a>                 doc.createElementNS(
-<a name="722" href="#722">722</a>                     WSConstants.ENC_NS, WSConstants.ENC_PREFIX + <span class="jxr_string">":DataReference"</span>
-<a name="723" href="#723">723</a>                 );
-<a name="724" href="#724">724</a>             dataReference.setAttributeNS(<strong class="jxr_keyword">null</strong>, <span class="jxr_string">"URI"</span>, dataReferenceUri);
-<a name="725" href="#725">725</a>             referenceList.appendChild(dataReference);
-<a name="726" href="#726">726</a>         }
-<a name="727" href="#727">727</a>         <strong class="jxr_keyword">return</strong> referenceList;
-<a name="728" href="#728">728</a>     }
-<a name="729" href="#729">729</a> 
-<a name="730" href="#730">730</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="731" href="#731">731</a> <em class="jxr_javadoccomment">     * @return The symmetric key</em>
-<a name="732" href="#732">732</a> <em class="jxr_javadoccomment">     */</em>
-<a name="733" href="#733">733</a>     <strong class="jxr_keyword">public</strong> SecretKey getSymmetricKey() {
-<a name="734" href="#734">734</a>         <strong class="jxr_keyword">return</strong> symmetricKey;
-<a name="735" href="#735">735</a>     }
-<a name="736" href="#736">736</a> 
-<a name="737" href="#737">737</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="738" href="#738">738</a> <em class="jxr_javadoccomment">     * Set the symmetric key to be used for encryption</em>
-<a name="739" href="#739">739</a> <em class="jxr_javadoccomment">     * </em>
-<a name="740" href="#740">740</a> <em class="jxr_javadoccomment">     * @param key</em>
-<a name="741" href="#741">741</a> <em class="jxr_javadoccomment">     */</em>
-<a name="742" href="#742">742</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setSymmetricKey(SecretKey key) {
-<a name="743" href="#743">743</a>         <strong class="jxr_keyword">this</strong>.symmetricKey = key;
-<a name="744" href="#744">744</a>     }
-<a name="745" href="#745">745</a> 
-<a name="746" href="#746">746</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="747" href="#747">747</a> <em class="jxr_javadoccomment">     * @return Return the SecurityTokenRefernce</em>
-<a name="748" href="#748">748</a> <em class="jxr_javadoccomment">     */</em>
-<a name="749" href="#749">749</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/ws/security/message/token/SecurityTokenReference.html">SecurityTokenReference</a> getSecurityTokenReference() {
-<a name="750" href="#750">750</a>         <strong class="jxr_keyword">return</strong> securityTokenReference;
-<a name="751" href="#751">751</a>     }
-<a name="752" href="#752">752</a> 
-<a name="753" href="#753">753</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="754" href="#754">754</a> <em class="jxr_javadoccomment">     * @param reference</em>
-<a name="755" href="#755">755</a> <em class="jxr_javadoccomment">     */</em>
-<a name="756" href="#756">756</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setSecurityTokenReference(<a href="../../../../../org/apache/ws/security/message/token/SecurityTokenReference.html">SecurityTokenReference</a> reference) {
-<a name="757" href="#757">757</a>         securityTokenReference = reference;
-<a name="758" href="#758">758</a>     }
-<a name="759" href="#759">759</a> 
-<a name="760" href="#760">760</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isEncryptSymmKey() {
-<a name="761" href="#761">761</a>         <strong class="jxr_keyword">return</strong> encryptSymmKey;
-<a name="762" href="#762">762</a>     }
-<a name="763" href="#763">763</a> 
-<a name="764" href="#764">764</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setEncryptSymmKey(<strong class="jxr_keyword">boolean</strong> encryptSymmKey) {
-<a name="765" href="#765">765</a>         <strong class="jxr_keyword">this</strong>.encryptSymmKey = encryptSymmKey;
-<a name="766" href="#766">766</a>     }
-<a name="767" href="#767">767</a> 
-<a name="768" href="#768">768</a>     <strong class="jxr_keyword">private</strong> String getSHA1(byte[] input) <strong class="jxr_keyword">throws</strong> WSSecurityException {
-<a name="769" href="#769">769</a>         <strong class="jxr_keyword">try</strong> {
-<a name="770" href="#770">770</a>             MessageDigest sha = <strong class="jxr_keyword">null</strong>;
-<a name="771" href="#771">771</a>             sha = MessageDigest.getInstance(<span class="jxr_string">"SHA-1"</span>);
-<a name="772" href="#772">772</a>             sha.reset();
-<a name="773" href="#773">773</a>             sha.update(input);
-<a name="774" href="#774">774</a>             byte[] data = sha.digest();
-<a name="775" href="#775">775</a>             
-<a name="776" href="#776">776</a>             <strong class="jxr_keyword">return</strong> Base64.encode(data);
-<a name="777" href="#777">777</a>         } <strong class="jxr_keyword">catch</strong> (NoSuchAlgorithmException e) {
-<a name="778" href="#778">778</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
-<a name="779" href="#779">779</a>                 WSSecurityException.UNSUPPORTED_ALGORITHM, <strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>, e
-<a name="780" href="#780">780</a>             );
-<a name="781" href="#781">781</a>         }
-<a name="782" href="#782">782</a>     }
-<a name="783" href="#783">783</a> 
-<a name="784" href="#784">784</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setCustomReferenceValue(String customReferenceValue) {
-<a name="785" href="#785">785</a>         <strong class="jxr_keyword">this</strong>.customReferenceValue = customReferenceValue;
-<a name="786" href="#786">786</a>     }
-<a name="787" href="#787">787</a>     
-<a name="788" href="#788">788</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setEncKeyValueType(String e) {
-<a name="789" href="#789">789</a>         encKeyValueType = e;
-<a name="790" href="#790">790</a>     }
-<a name="791" href="#791">791</a>     
-<a name="792" href="#792">792</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setEncKeyIdDirectId(<strong class="jxr_keyword">boolean</strong> b) {
-<a name="793" href="#793">793</a>         encKeyIdDirectId = b;
-<a name="794" href="#794">794</a>     }
-<a name="795" href="#795">795</a> }
+<a name="537" href="#537">537</a>                         WSConstants.WSU_NS, wsuPrefix + <span class="jxr_string">":Id"</span>, 
+<a name="538" href="#538">538</a>                         wssConfig.getIdAllocator().createId(<span class="jxr_string">"EncHeader-"</span>, body)
+<a name="539" href="#539">539</a>                     );
+<a name="540" href="#540">540</a>                     
+<a name="541" href="#541">541</a>                     NamedNodeMap map = body.getAttributes();
+<a name="542" href="#542">542</a>                     
+<a name="543" href="#543">543</a>                     <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0 ; i &lt; map.getLength() ; i++) {
+<a name="544" href="#544">544</a>                         Attr attr = (Attr)map.item(i);
+<a name="545" href="#545">545</a>                         <strong class="jxr_keyword">if</strong> (attr.getNamespaceURI().equals(WSConstants.URI_SOAP11_ENV)
+<a name="546" href="#546">546</a>                             || attr.getNamespaceURI().equals(WSConstants.URI_SOAP12_ENV)) {                         
+<a name="547" href="#547">547</a>                             String soapEnvPrefix = 
+<a name="548" href="#548">548</a>                                 WSSecurityUtil.setNamespace(
+<a name="549" href="#549">549</a>                                     elem, attr.getNamespaceURI(), WSConstants.DEFAULT_SOAP_PREFIX
+<a name="550" href="#550">550</a>                                 );
+<a name="551" href="#551">551</a>                             elem.setAttributeNS(
+<a name="552" href="#552">552</a>                                 attr.getNamespaceURI(), 
+<a name="553" href="#553">553</a>                                 soapEnvPrefix + <span class="jxr_string">":"</span> + attr.getLocalName(), 
+<a name="554" href="#554">554</a>                                 attr.getValue()
+<a name="555" href="#555">555</a>                             );
+<a name="556" href="#556">556</a>                         }
+<a name="557" href="#557">557</a>                     }
+<a name="558" href="#558">558</a>                     
+<a name="559" href="#559">559</a>                     xmlCipher.init(XMLCipher.ENCRYPT_MODE, secretKey);
+<a name="560" href="#560">560</a>                     EncryptedData encData = xmlCipher.getEncryptedData();
+<a name="561" href="#561">561</a>                     encData.setId(xencEncryptedDataId);
+<a name="562" href="#562">562</a>                     encData.setKeyInfo(keyInfo);
+<a name="563" href="#563">563</a>                     xmlCipher.doFinal(doc, body, content);
+<a name="564" href="#564">564</a>                     
+<a name="565" href="#565">565</a>                     Element encDataElem = 
+<a name="566" href="#566">566</a>                         WSSecurityUtil.findElementById(
+<a name="567" href="#567">567</a>                             document.getDocumentElement(), xencEncryptedDataId, <strong class="jxr_keyword">null</strong>
+<a name="568" href="#568">568</a>                         );
+<a name="569" href="#569">569</a>                     Node clone = encDataElem.cloneNode(<strong class="jxr_keyword">true</strong>);
+<a name="570" href="#570">570</a>                     elem.appendChild(clone);
+<a name="571" href="#571">571</a>                     encDataElem.getParentNode().appendChild(elem);
+<a name="572" href="#572">572</a>                     encDataElem.getParentNode().removeChild(encDataElem); 
+<a name="573" href="#573">573</a>                 } <strong class="jxr_keyword">else</strong> {
+<a name="574" href="#574">574</a>                     xmlCipher.init(XMLCipher.ENCRYPT_MODE, secretKey);
+<a name="575" href="#575">575</a>                     EncryptedData encData = xmlCipher.getEncryptedData();
+<a name="576" href="#576">576</a>                     encData.setId(xencEncryptedDataId);
+<a name="577" href="#577">577</a>                     encData.setKeyInfo(keyInfo);
+<a name="578" href="#578">578</a>                     xmlCipher.doFinal(doc, body, content);          
+<a name="579" href="#579">579</a>                 }
+<a name="580" href="#580">580</a>                 <strong class="jxr_keyword">if</strong> (cloneKeyInfo) {
+<a name="581" href="#581">581</a>                     keyInfo = <strong class="jxr_keyword">new</strong> KeyInfo((Element) keyInfo.getElement().cloneNode(<strong class="jxr_keyword">true</strong>), <strong class="jxr_keyword">null</strong>);
+<a name="582" href="#582">582</a>                 }
+<a name="583" href="#583">583</a>             } <strong class="jxr_keyword">catch</strong> (Exception e2) {
+<a name="584" href="#584">584</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
+<a name="585" href="#585">585</a>                     WSSecurityException.FAILED_ENCRYPTION, <strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>, e2
+<a name="586" href="#586">586</a>                 );
+<a name="587" href="#587">587</a>             }
+<a name="588" href="#588">588</a>             encDataRef.add(<strong class="jxr_keyword">new</strong> String(<span class="jxr_string">"#"</span> + xencEncryptedDataId));
+<a name="589" href="#589">589</a>         }
+<a name="590" href="#590">590</a>         <strong class="jxr_keyword">return</strong> encDataRef;
+<a name="591" href="#591">591</a>     }
+<a name="592" href="#592">592</a> 
+<a name="593" href="#593">593</a>     <strong class="jxr_keyword">private</strong> Document buildEmbedded(Document doc, <a href="../../../../../org/apache/ws/security/message/WSSecHeader.html">WSSecHeader</a> secHeader) 
+<a name="594" href="#594">594</a>         <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> {
+<a name="595" href="#595">595</a>         doDebug = log.isDebugEnabled();
+<a name="596" href="#596">596</a> 
+<a name="597" href="#597">597</a>         <strong class="jxr_keyword">if</strong> (doDebug) {
+<a name="598" href="#598">598</a>             log.debug(<span class="jxr_string">"Beginning Encryption embedded..."</span>);
+<a name="599" href="#599">599</a>         }
+<a name="600" href="#600">600</a>         envelope = doc.getDocumentElement();
+<a name="601" href="#601">601</a>         envelope.setAttributeNS(
+<a name="602" href="#602">602</a>             WSConstants.XMLNS_NS, <span class="jxr_string">"xmlns:"</span> + WSConstants.ENC_PREFIX, WSConstants.ENC_NS
+<a name="603" href="#603">603</a>         );
+<a name="604" href="#604">604</a> 
+<a name="605" href="#605">605</a>         <em class="jxr_comment">//</em>
+<a name="606" href="#606">606</a>         <em class="jxr_comment">// Second step: generate a symmetric key from the specified key</em>
+<a name="607" href="#607">607</a>         <em class="jxr_comment">// (password) for this algorithm, and set the cipher into encryption</em>
+<a name="608" href="#608">608</a>         <em class="jxr_comment">// mode.</em>
+<a name="609" href="#609">609</a>         <em class="jxr_comment">//</em>
+<a name="610" href="#610">610</a>         <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.symmetricKey == <strong class="jxr_keyword">null</strong>) {
+<a name="611" href="#611">611</a>             <strong class="jxr_keyword">if</strong> (embeddedKey == <strong class="jxr_keyword">null</strong>) {
+<a name="612" href="#612">612</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(WSSecurityException.FAILURE, <span class="jxr_string">"noKeySupplied"</span>);
+<a name="613" href="#613">613</a>             }
+<a name="614" href="#614">614</a>             <strong class="jxr_keyword">this</strong>.symmetricKey = WSSecurityUtil.prepareSecretKey(symEncAlgo, embeddedKey);
+<a name="615" href="#615">615</a>         }
+<a name="616" href="#616">616</a> 
+<a name="617" href="#617">617</a>         KeyInfo keyInfo = <strong class="jxr_keyword">null</strong>;
+<a name="618" href="#618">618</a>         <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.keyIdentifierType == WSConstants.EMBEDDED_KEYNAME) {
+<a name="619" href="#619">619</a>             keyInfo = <strong class="jxr_keyword">new</strong> KeyInfo(doc);
+<a name="620" href="#620">620</a>             keyInfo.addKeyName(embeddedKeyName == <strong class="jxr_keyword">null</strong> ? user : embeddedKeyName);
+<a name="621" href="#621">621</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.keyIdentifierType == WSConstants.EMBED_SECURITY_TOKEN_REF) {
+<a name="622" href="#622">622</a>             <em class="jxr_comment">//</em>
+<a name="623" href="#623">623</a>             <em class="jxr_comment">// This means that we want to embed a &lt;wsse:SecurityTokenReference&gt;</em>
+<a name="624" href="#624">624</a>             <em class="jxr_comment">// into keyInfo element. If we need this functionality, this.secRef</em>
+<a name="625" href="#625">625</a>             <em class="jxr_comment">// MUST be set before calling the build(doc, crypto) method. So if</em>
+<a name="626" href="#626">626</a>             <em class="jxr_comment">// secRef is null then throw an exception.</em>
+<a name="627" href="#627">627</a>             <em class="jxr_comment">//</em>
+<a name="628" href="#628">628</a>             <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.securityTokenReference == <strong class="jxr_keyword">null</strong>) {
+<a name="629" href="#629">629</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
+<a name="630" href="#630">630</a>                     WSSecurityException.SECURITY_TOKEN_UNAVAILABLE,
+<a name="631" href="#631">631</a>                     <span class="jxr_string">"You must set keyInfo element, if the keyIdentifier == EMBED_SECURITY_TOKEN_REF"</span>
+<a name="632" href="#632">632</a>                  );
+<a name="633" href="#633">633</a>             } <strong class="jxr_keyword">else</strong> {
+<a name="634" href="#634">634</a>                 keyInfo = <strong class="jxr_keyword">new</strong> KeyInfo(doc);
+<a name="635" href="#635">635</a>                 Element tmpE = securityTokenReference.getElement();
+<a name="636" href="#636">636</a>                 tmpE.setAttributeNS(
+<a name="637" href="#637">637</a>                     WSConstants.XMLNS_NS, <span class="jxr_string">"xmlns:"</span> + tmpE.getPrefix(), tmpE.getNamespaceURI()
+<a name="638" href="#638">638</a>                 );
+<a name="639" href="#639">639</a>                 keyInfo.addUnknownElement(securityTokenReference.getElement());
+<a name="640" href="#640">640</a>             }
+<a name="641" href="#641">641</a>         }
+<a name="642" href="#642">642</a>         Element keyInfoElement = keyInfo.getElement();
+<a name="643" href="#643">643</a>         keyInfoElement.setAttributeNS(
+<a name="644" href="#644">644</a>             WSConstants.XMLNS_NS, <span class="jxr_string">"xmlns:"</span> + WSConstants.SIG_PREFIX, WSConstants.SIG_NS
+<a name="645" href="#645">645</a>         );
+<a name="646" href="#646">646</a> 
+<a name="647" href="#647">647</a>         <a href="../../../../../org/apache/ws/security/SOAPConstants.html">SOAPConstants</a> soapConstants = WSSecurityUtil.getSOAPConstants(envelope);
+<a name="648" href="#648">648</a>         <strong class="jxr_keyword">if</strong> (parts == <strong class="jxr_keyword">null</strong>) {
+<a name="649" href="#649">649</a>             parts = <strong class="jxr_keyword">new</strong> Vector();
+<a name="650" href="#650">650</a>             <a href="../../../../../org/apache/ws/security/WSEncryptionPart.html">WSEncryptionPart</a> encP = 
+<a name="651" href="#651">651</a>                 <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSEncryptionPart.html">WSEncryptionPart</a>(
+<a name="652" href="#652">652</a>                     soapConstants.getBodyQName().getLocalPart(), 
+<a name="653" href="#653">653</a>                     soapConstants.getEnvelopeURI(), 
+<a name="654" href="#654">654</a>                     <span class="jxr_string">"Content"</span>
+<a name="655" href="#655">655</a>                 );
+<a name="656" href="#656">656</a>             parts.add(encP);
+<a name="657" href="#657">657</a>         }
+<a name="658" href="#658">658</a>         Vector encDataRefs = doEncryption(doc, <strong class="jxr_keyword">this</strong>.symmetricKey, keyInfo, parts);
+<a name="659" href="#659">659</a> 
+<a name="660" href="#660">660</a>         <em class="jxr_comment">//</em>
+<a name="661" href="#661">661</a>         <em class="jxr_comment">// At this point data is encrypted with the symmetric key and can be</em>
+<a name="662" href="#662">662</a>         <em class="jxr_comment">// referenced via the above Id</em>
+<a name="663" href="#663">663</a>         <em class="jxr_comment">//</em>
+<a name="664" href="#664">664</a> 
+<a name="665" href="#665">665</a>         <em class="jxr_comment">//</em>
+<a name="666" href="#666">666</a>         <em class="jxr_comment">// Now we need to setup the wsse:Security header block 1) get (or</em>
+<a name="667" href="#667">667</a>         <em class="jxr_comment">// create) the wsse:Security header block 2) The last step sets up the</em>
+<a name="668" href="#668">668</a>         <em class="jxr_comment">// reference list that pints to the encrypted data</em>
+<a name="669" href="#669">669</a>         <em class="jxr_comment">//</em>
+<a name="670" href="#670">670</a>         Element wsseSecurity = secHeader.getSecurityHeader();
+<a name="671" href="#671">671</a> 
+<a name="672" href="#672">672</a>         Element referenceList = 
+<a name="673" href="#673">673</a>             doc.createElementNS(WSConstants.ENC_NS, WSConstants.ENC_PREFIX + <span class="jxr_string">":ReferenceList"</span>);
+<a name="674" href="#674">674</a>         referenceList = createDataRefList(doc, referenceList, encDataRefs);
+<a name="675" href="#675">675</a>         WSSecurityUtil.prependChildElement(wsseSecurity, referenceList);
+<a name="676" href="#676">676</a> 
+<a name="677" href="#677">677</a>         <strong class="jxr_keyword">return</strong> doc;
+<a name="678" href="#678">678</a>     }
+<a name="679" href="#679">679</a> 
+<a name="680" href="#680">680</a>     <strong class="jxr_keyword">private</strong> KeyGenerator getKeyGenerator() <strong class="jxr_keyword">throws</strong> WSSecurityException {
+<a name="681" href="#681">681</a>         KeyGenerator keyGen = <strong class="jxr_keyword">null</strong>;
+<a name="682" href="#682">682</a>         <strong class="jxr_keyword">try</strong> {
+<a name="683" href="#683">683</a>             <em class="jxr_comment">//</em>
+<a name="684" href="#684">684</a>             <em class="jxr_comment">// Assume AES as default, so initialize it</em>
+<a name="685" href="#685">685</a>             <em class="jxr_comment">//</em>
+<a name="686" href="#686">686</a>             keyGen = KeyGenerator.getInstance(<span class="jxr_string">"AES"</span>);
+<a name="687" href="#687">687</a>             <strong class="jxr_keyword">if</strong> (symEncAlgo.equalsIgnoreCase(WSConstants.TRIPLE_DES)) {
+<a name="688" href="#688">688</a>                 keyGen = KeyGenerator.getInstance(<span class="jxr_string">"DESede"</span>);
+<a name="689" href="#689">689</a>             } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (symEncAlgo.equalsIgnoreCase(WSConstants.AES_128)) {
+<a name="690" href="#690">690</a>                 keyGen.init(128);
+<a name="691" href="#691">691</a>             } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (symEncAlgo.equalsIgnoreCase(WSConstants.AES_192)) {
+<a name="692" href="#692">692</a>                 keyGen.init(192);
+<a name="693" href="#693">693</a>             } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (symEncAlgo.equalsIgnoreCase(WSConstants.AES_256)) {
+<a name="694" href="#694">694</a>                 keyGen.init(256);
+<a name="695" href="#695">695</a>             } <strong class="jxr_keyword">else</strong> {
+<a name="696" href="#696">696</a>                 <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
+<a name="697" href="#697">697</a>             }
+<a name="698" href="#698">698</a>         } <strong class="jxr_keyword">catch</strong> (NoSuchAlgorithmException e) {
+<a name="699" href="#699">699</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
+<a name="700" href="#700">700</a>                 WSSecurityException.UNSUPPORTED_ALGORITHM, <strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>, e
+<a name="701" href="#701">701</a>             );
+<a name="702" href="#702">702</a>         }
+<a name="703" href="#703">703</a>         <strong class="jxr_keyword">return</strong> keyGen;
+<a name="704" href="#704">704</a>     }
+<a name="705" href="#705">705</a> 
+<a name="706" href="#706">706</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="707" href="#707">707</a> <em class="jxr_javadoccomment">     * Create DOM subtree for &lt;code&gt;xenc:EncryptedKey&lt;/code&gt;</em>
+<a name="708" href="#708">708</a> <em class="jxr_javadoccomment">     * </em>
+<a name="709" href="#709">709</a> <em class="jxr_javadoccomment">     * @param doc the SOAP envelope parent document</em>
+<a name="710" href="#710">710</a> <em class="jxr_javadoccomment">     * @param referenceList</em>
+<a name="711" href="#711">711</a> <em class="jxr_javadoccomment">     * @param encDataRefs</em>
+<a name="712" href="#712">712</a> <em class="jxr_javadoccomment">     * @return an &lt;code&gt;xenc:EncryptedKey&lt;/code&gt; element</em>
+<a name="713" href="#713">713</a> <em class="jxr_javadoccomment">     */</em>
+<a name="714" href="#714">714</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> Element createDataRefList(
+<a name="715" href="#715">715</a>         Document doc,
+<a name="716" href="#716">716</a>         Element referenceList, 
+<a name="717" href="#717">717</a>         Vector encDataRefs
+<a name="718" href="#718">718</a>     ) {
+<a name="719" href="#719">719</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; encDataRefs.size(); i++) {
+<a name="720" href="#720">720</a>             String dataReferenceUri = (String) encDataRefs.get(i);
+<a name="721" href="#721">721</a>             Element dataReference = 
+<a name="722" href="#722">722</a>                 doc.createElementNS(
+<a name="723" href="#723">723</a>                     WSConstants.ENC_NS, WSConstants.ENC_PREFIX + <span class="jxr_string">":DataReference"</span>
+<a name="724" href="#724">724</a>                 );
+<a name="725" href="#725">725</a>             dataReference.setAttributeNS(<strong class="jxr_keyword">null</strong>, <span class="jxr_string">"URI"</span>, dataReferenceUri);
+<a name="726" href="#726">726</a>             referenceList.appendChild(dataReference);
+<a name="727" href="#727">727</a>         }
+<a name="728" href="#728">728</a>         <strong class="jxr_keyword">return</strong> referenceList;
+<a name="729" href="#729">729</a>     }
+<a name="730" href="#730">730</a> 
+<a name="731" href="#731">731</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="732" href="#732">732</a> <em class="jxr_javadoccomment">     * @return The symmetric key</em>
+<a name="733" href="#733">733</a> <em class="jxr_javadoccomment">     */</em>
+<a name="734" href="#734">734</a>     <strong class="jxr_keyword">public</strong> SecretKey getSymmetricKey() {
+<a name="735" href="#735">735</a>         <strong class="jxr_keyword">return</strong> symmetricKey;
+<a name="736" href="#736">736</a>     }
+<a name="737" href="#737">737</a> 
+<a name="738" href="#738">738</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="739" href="#739">739</a> <em class="jxr_javadoccomment">     * Set the symmetric key to be used for encryption</em>
+<a name="740" href="#740">740</a> <em class="jxr_javadoccomment">     * </em>
+<a name="741" href="#741">741</a> <em class="jxr_javadoccomment">     * @param key</em>
+<a name="742" href="#742">742</a> <em class="jxr_javadoccomment">     */</em>
+<a name="743" href="#743">743</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setSymmetricKey(SecretKey key) {
+<a name="744" href="#744">744</a>         <strong class="jxr_keyword">this</strong>.symmetricKey = key;
+<a name="745" href="#745">745</a>     }
+<a name="746" href="#746">746</a> 
+<a name="747" href="#747">747</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="748" href="#748">748</a> <em class="jxr_javadoccomment">     * @return Return the SecurityTokenRefernce</em>
+<a name="749" href="#749">749</a> <em class="jxr_javadoccomment">     */</em>
+<a name="750" href="#750">750</a>     <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/ws/security/message/token/SecurityTokenReference.html">SecurityTokenReference</a> getSecurityTokenReference() {
+<a name="751" href="#751">751</a>         <strong class="jxr_keyword">return</strong> securityTokenReference;
+<a name="752" href="#752">752</a>     }
+<a name="753" href="#753">753</a> 
+<a name="754" href="#754">754</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="755" href="#755">755</a> <em class="jxr_javadoccomment">     * @param reference</em>
+<a name="756" href="#756">756</a> <em class="jxr_javadoccomment">     */</em>
+<a name="757" href="#757">757</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setSecurityTokenReference(<a href="../../../../../org/apache/ws/security/message/token/SecurityTokenReference.html">SecurityTokenReference</a> reference) {
+<a name="758" href="#758">758</a>         securityTokenReference = reference;
+<a name="759" href="#759">759</a>     }
+<a name="760" href="#760">760</a> 
+<a name="761" href="#761">761</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isEncryptSymmKey() {
+<a name="762" href="#762">762</a>         <strong class="jxr_keyword">return</strong> encryptSymmKey;
+<a name="763" href="#763">763</a>     }
+<a name="764" href="#764">764</a> 
+<a name="765" href="#765">765</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setEncryptSymmKey(<strong class="jxr_keyword">boolean</strong> encryptSymmKey) {
+<a name="766" href="#766">766</a>         <strong class="jxr_keyword">this</strong>.encryptSymmKey = encryptSymmKey;
+<a name="767" href="#767">767</a>     }
+<a name="768" href="#768">768</a> 
+<a name="769" href="#769">769</a>     <strong class="jxr_keyword">private</strong> String getSHA1(byte[] input) <strong class="jxr_keyword">throws</strong> WSSecurityException {
+<a name="770" href="#770">770</a>         <strong class="jxr_keyword">try</strong> {
+<a name="771" href="#771">771</a>             MessageDigest sha = <strong class="jxr_keyword">null</strong>;
+<a name="772" href="#772">772</a>             sha = MessageDigest.getInstance(<span class="jxr_string">"SHA-1"</span>);
+<a name="773" href="#773">773</a>             sha.reset();
+<a name="774" href="#774">774</a>             sha.update(input);
+<a name="775" href="#775">775</a>             byte[] data = sha.digest();
+<a name="776" href="#776">776</a>             
+<a name="777" href="#777">777</a>             <strong class="jxr_keyword">return</strong> Base64.encode(data);
+<a name="778" href="#778">778</a>         } <strong class="jxr_keyword">catch</strong> (NoSuchAlgorithmException e) {
+<a name="779" href="#779">779</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(
+<a name="780" href="#780">780</a>                 WSSecurityException.UNSUPPORTED_ALGORITHM, <strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>, e
+<a name="781" href="#781">781</a>             );
+<a name="782" href="#782">782</a>         }
+<a name="783" href="#783">783</a>     }
+<a name="784" href="#784">784</a> 
+<a name="785" href="#785">785</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setCustomReferenceValue(String customReferenceValue) {
+<a name="786" href="#786">786</a>         <strong class="jxr_keyword">this</strong>.customReferenceValue = customReferenceValue;
+<a name="787" href="#787">787</a>     }
+<a name="788" href="#788">788</a>     
+<a name="789" href="#789">789</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setEncKeyValueType(String e) {
+<a name="790" href="#790">790</a>         encKeyValueType = e;
+<a name="791" href="#791">791</a>     }
+<a name="792" href="#792">792</a>     
+<a name="793" href="#793">793</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setEncKeyIdDirectId(<strong class="jxr_keyword">boolean</strong> b) {
+<a name="794" href="#794">794</a>         encKeyIdDirectId = b;
+<a name="795" href="#795">795</a>     }
+<a name="796" href="#796">796</a> }
 </pre>
 <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
 </html>



---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org