You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2012/12/04 13:49:58 UTC

svn commit: r1416918 [37/47] - in /webservices/wss4j/site: ./ apidocs/ apidocs/org/apache/ws/security/ apidocs/org/apache/ws/security/action/ apidocs/org/apache/ws/security/action/class-use/ apidocs/org/apache/ws/security/cache/ apidocs/org/apache/ws/s...

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecSignatureConfirmation.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecSignatureConfirmation.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecSignatureConfirmation.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/WSSecSignatureConfirmation.html Tue Dec  4 12:48:10 2012
@@ -47,7 +47,7 @@
 <a name="37" href="#37">37</a>  
 <a name="38" href="#38">38</a>      <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/ws/security/message/token/SignatureConfirmation.html">SignatureConfirmation</a> sc = <strong class="jxr_keyword">null</strong>;
 <a name="39" href="#39">39</a>  
-<a name="40" href="#40">40</a>      byte[] signatureValue = <strong class="jxr_keyword">null</strong>;
+<a name="40" href="#40">40</a>      <strong class="jxr_keyword">private</strong> byte[] signatureValue = <strong class="jxr_keyword">null</strong>;
 <a name="41" href="#41">41</a>  
 <a name="42" href="#42">42</a>      <strong class="jxr_keyword">public</strong> <a href="../../../../../org/apache/ws/security/message/WSSecSignatureConfirmation.html">WSSecSignatureConfirmation</a>() {
 <a name="43" href="#43">43</a>          <strong class="jxr_keyword">super</strong>();

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/package-frame.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/package-frame.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/package-frame.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/package-frame.html Tue Dec  4 12:48:10 2012
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
 	<head>
 		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
-		<title>WSS4J 1.6.7 Reference Package org.apache.ws.security.message</title>
+		<title>Apache WSS4J 1.6.8 Reference Package org.apache.ws.security.message</title>
 		<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
 	</head>
 	<body>

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/package-summary.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/package-summary.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/package-summary.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/package-summary.html Tue Dec  4 12:48:10 2012
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
 	<head>
 		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
-		<title>WSS4J 1.6.7 Reference Package org.apache.ws.security.message</title>
+		<title>Apache WSS4J 1.6.8 Reference Package org.apache.ws.security.message</title>
 		<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
 	</head>
 	<body>

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/token/DOMX509IssuerSerial.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/token/DOMX509IssuerSerial.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/token/DOMX509IssuerSerial.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/token/DOMX509IssuerSerial.html Tue Dec  4 12:48:10 2012
@@ -31,8 +31,8 @@
 <a name="21" href="#21">21</a>  
 <a name="22" href="#22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.WSConstants;
 <a name="23" href="#23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.util.DOM2Writer;
-<a name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.util.WSSecurityUtil;
-<a name="25" href="#25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.xml.security.utils.RFC2253Parser;
+<a name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.util.RFC2253Parser;
+<a name="25" href="#25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.util.WSSecurityUtil;
 <a name="26" href="#26">26</a>  <strong class="jxr_keyword">import</strong> org.w3c.dom.Document;
 <a name="27" href="#27">27</a>  <strong class="jxr_keyword">import</strong> org.w3c.dom.Element;
 <a name="28" href="#28">28</a>  <strong class="jxr_keyword">import</strong> org.w3c.dom.Node;

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/token/DerivedKeyToken.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/token/DerivedKeyToken.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/token/DerivedKeyToken.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/token/DerivedKeyToken.html Tue Dec  4 12:48:10 2012
@@ -505,169 +505,170 @@
 <a name="495" href="#495">495</a>         principal.setLabel(getLabel());
 <a name="496" href="#496">496</a>         principal.setLength(getLength());
 <a name="497" href="#497">497</a>         principal.setOffset(getOffset());
-<a name="498" href="#498">498</a>         
-<a name="499" href="#499">499</a>         String basetokenId = <strong class="jxr_keyword">null</strong>;
-<a name="500" href="#500">500</a>         <a href="../../../../../../org/apache/ws/security/message/token/SecurityTokenReference.html">SecurityTokenReference</a> securityTokenReference = getSecurityTokenReference();
-<a name="501" href="#501">501</a>         <strong class="jxr_keyword">if</strong> (securityTokenReference.containsReference()) {
-<a name="502" href="#502">502</a>             basetokenId = securityTokenReference.getReference().getURI();
-<a name="503" href="#503">503</a>             <strong class="jxr_keyword">if</strong> (basetokenId.charAt(0) == '#') {
-<a name="504" href="#504">504</a>                 basetokenId = basetokenId.substring(1);
-<a name="505" href="#505">505</a>             }
-<a name="506" href="#506">506</a>         } <strong class="jxr_keyword">else</strong> {
-<a name="507" href="#507">507</a>             <em class="jxr_comment">// KeyIdentifier</em>
-<a name="508" href="#508">508</a>             basetokenId = securityTokenReference.getKeyIdentifierValue();
-<a name="509" href="#509">509</a>         }
-<a name="510" href="#510">510</a>         principal.setBasetokenId(basetokenId);
-<a name="511" href="#511">511</a>         
-<a name="512" href="#512">512</a>         <strong class="jxr_keyword">return</strong> principal;
-<a name="513" href="#513">513</a>     }
-<a name="514" href="#514">514</a> 
-<a name="515" href="#515">515</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="516" href="#516">516</a> <em class="jxr_javadoccomment">     * Set the derivation algorithm of this derived key token.</em>
-<a name="517" href="#517">517</a> <em class="jxr_javadoccomment">     *</em>
-<a name="518" href="#518">518</a> <em class="jxr_javadoccomment">     * @param algo the value for the &lt;code&gt;Algorithm&lt;/code&gt; attribute of this</em>
-<a name="519" href="#519">519</a> <em class="jxr_javadoccomment">     *             DerivedKeyToken</em>
-<a name="520" href="#520">520</a> <em class="jxr_javadoccomment">     */</em>
-<a name="521" href="#521">521</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setAlgorithm(String algo) {
-<a name="522" href="#522">522</a>         element.setAttributeNS(ns, <span class="jxr_string">"Algorithm"</span>, algo);
-<a name="523" href="#523">523</a>     }
-<a name="524" href="#524">524</a>     
-<a name="525" href="#525">525</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="526" href="#526">526</a> <em class="jxr_javadoccomment">     * Derive a key from this DerivedKeyToken instance</em>
-<a name="527" href="#527">527</a> <em class="jxr_javadoccomment">     * @param length</em>
-<a name="528" href="#528">528</a> <em class="jxr_javadoccomment">     * @param secret</em>
-<a name="529" href="#529">529</a> <em class="jxr_javadoccomment">     * @throws WSSecurityException</em>
-<a name="530" href="#530">530</a> <em class="jxr_javadoccomment">     */</em>
-<a name="531" href="#531">531</a>     <strong class="jxr_keyword">public</strong> byte[] deriveKey(<strong class="jxr_keyword">int</strong> length, byte[] secret) <strong class="jxr_keyword">throws</strong> WSSecurityException {
-<a name="532" href="#532">532</a>         <strong class="jxr_keyword">try</strong> {
-<a name="533" href="#533">533</a>             <a href="../../../../../../org/apache/ws/security/conversation/ConversationConstants.html">DerivationAlgorithm</a> algo = AlgoFactory.getInstance(getAlgorithm());
-<a name="534" href="#534">534</a>             byte[] labelBytes = <strong class="jxr_keyword">null</strong>;
-<a name="535" href="#535">535</a>             String label = getLabel();
-<a name="536" href="#536">536</a>             <strong class="jxr_keyword">if</strong> (label == <strong class="jxr_keyword">null</strong> || label.length() == 0) {
-<a name="537" href="#537">537</a>                 labelBytes = 
-<a name="538" href="#538">538</a>                     (ConversationConstants.DEFAULT_LABEL 
-<a name="539" href="#539">539</a>                         + ConversationConstants.DEFAULT_LABEL).getBytes(<span class="jxr_string">"UTF-8"</span>);
-<a name="540" href="#540">540</a>             } <strong class="jxr_keyword">else</strong> {
-<a name="541" href="#541">541</a>                 labelBytes = label.getBytes(<span class="jxr_string">"UTF-8"</span>);
-<a name="542" href="#542">542</a>             }
-<a name="543" href="#543">543</a>             
-<a name="544" href="#544">544</a>             byte[] nonce = Base64.decode(getNonce());
-<a name="545" href="#545">545</a>             byte[] seed = <strong class="jxr_keyword">new</strong> byte[labelBytes.length + nonce.length];
-<a name="546" href="#546">546</a>             System.arraycopy(labelBytes, 0, seed, 0, labelBytes.length);
-<a name="547" href="#547">547</a>             System.arraycopy(nonce, 0, seed, labelBytes.length, nonce.length);
-<a name="548" href="#548">548</a>             
-<a name="549" href="#549">549</a>             <strong class="jxr_keyword">if</strong> (length &lt;= 0) {
-<a name="550" href="#550">550</a>                 length = getLength();
-<a name="551" href="#551">551</a>             }
-<a name="552" href="#552">552</a>             <strong class="jxr_keyword">return</strong> algo.createKey(secret, seed, getOffset(), length);
-<a name="553" href="#553">553</a>             
-<a name="554" href="#554">554</a>         } <strong class="jxr_keyword">catch</strong> (Exception e) {
-<a name="555" href="#555">555</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="556" href="#556">556</a>                 WSSecurityException.FAILURE, <strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>, e
-<a name="557" href="#557">557</a>             );
-<a name="558" href="#558">558</a>         }
-<a name="559" href="#559">559</a>     }
-<a name="560" href="#560">560</a>     
-<a name="561" href="#561">561</a>     @Override
-<a name="562" href="#562">562</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> hashCode() {
-<a name="563" href="#563">563</a>         <strong class="jxr_keyword">int</strong> result = 17;
-<a name="564" href="#564">564</a>         String algorithm = getAlgorithm();
-<a name="565" href="#565">565</a>         <strong class="jxr_keyword">if</strong> (algorithm != <strong class="jxr_keyword">null</strong>) {
-<a name="566" href="#566">566</a>             result = 31 * result + algorithm.hashCode();
-<a name="567" href="#567">567</a>         }
-<a name="568" href="#568">568</a>         <strong class="jxr_keyword">try</strong> {
-<a name="569" href="#569">569</a>             <a href="../../../../../../org/apache/ws/security/message/token/SecurityTokenReference.html">SecurityTokenReference</a> tokenReference = getSecurityTokenReference();
-<a name="570" href="#570">570</a>             <strong class="jxr_keyword">if</strong> (tokenReference != <strong class="jxr_keyword">null</strong>) {
-<a name="571" href="#571">571</a>                 result = 31 * result + tokenReference.hashCode();
-<a name="572" href="#572">572</a>             }
-<a name="573" href="#573">573</a>         } <strong class="jxr_keyword">catch</strong> (WSSecurityException e) {
-<a name="574" href="#574">574</a>             log.error(e);
-<a name="575" href="#575">575</a>         }
-<a name="576" href="#576">576</a>         
-<a name="577" href="#577">577</a>         Map&lt;String, String&gt; properties = getProperties();
-<a name="578" href="#578">578</a>         <strong class="jxr_keyword">if</strong> (properties != <strong class="jxr_keyword">null</strong>) {
-<a name="579" href="#579">579</a>             result = 31 * result + properties.hashCode();
-<a name="580" href="#580">580</a>         }
-<a name="581" href="#581">581</a>         <strong class="jxr_keyword">int</strong> generation = getGeneration();
-<a name="582" href="#582">582</a>         <strong class="jxr_keyword">if</strong> (generation != -1) {
-<a name="583" href="#583">583</a>             result = 31 * result + generation;
-<a name="584" href="#584">584</a>         }
-<a name="585" href="#585">585</a>         <strong class="jxr_keyword">int</strong> offset = getOffset();
-<a name="586" href="#586">586</a>         <strong class="jxr_keyword">if</strong> (offset != -1) {
-<a name="587" href="#587">587</a>             result = 31 * result + offset;
-<a name="588" href="#588">588</a>         }
-<a name="589" href="#589">589</a>         <strong class="jxr_keyword">int</strong> length = getLength();
-<a name="590" href="#590">590</a>         <strong class="jxr_keyword">if</strong> (length != -1) {
-<a name="591" href="#591">591</a>             result = 31 * result + length;
-<a name="592" href="#592">592</a>         }
-<a name="593" href="#593">593</a>         String label = getLabel();
-<a name="594" href="#594">594</a>         <strong class="jxr_keyword">if</strong> (label != <strong class="jxr_keyword">null</strong>) {
-<a name="595" href="#595">595</a>             result = 31 * result + label.hashCode();
-<a name="596" href="#596">596</a>         }
-<a name="597" href="#597">597</a>         String nonce = getNonce();
-<a name="598" href="#598">598</a>         <strong class="jxr_keyword">if</strong> (nonce != <strong class="jxr_keyword">null</strong>) {
-<a name="599" href="#599">599</a>             result = 31 * result + nonce.hashCode();
-<a name="600" href="#600">600</a>         }
-<a name="601" href="#601">601</a>         
-<a name="602" href="#602">602</a>         <strong class="jxr_keyword">return</strong> result;
-<a name="603" href="#603">603</a>     }
-<a name="604" href="#604">604</a>     
-<a name="605" href="#605">605</a>     @Override
-<a name="606" href="#606">606</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(Object object) {
-<a name="607" href="#607">607</a>         <strong class="jxr_keyword">if</strong> (!(object instanceof DerivedKeyToken)) {
-<a name="608" href="#608">608</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="609" href="#609">609</a>         }
-<a name="610" href="#610">610</a>         <a href="../../../../../../org/apache/ws/security/message/token/DerivedKeyToken.html">DerivedKeyToken</a> token = (DerivedKeyToken)object;
-<a name="611" href="#611">611</a>         <strong class="jxr_keyword">if</strong> (!compare(getAlgorithm(), token.getAlgorithm())) {
-<a name="612" href="#612">612</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="613" href="#613">613</a>         }
-<a name="614" href="#614">614</a>         <strong class="jxr_keyword">try</strong> {
-<a name="615" href="#615">615</a>             <strong class="jxr_keyword">if</strong> (!getSecurityTokenReference().equals(token.getSecurityTokenReference())) {
-<a name="616" href="#616">616</a>                 <strong class="jxr_keyword">return</strong> false;
-<a name="617" href="#617">617</a>             }
-<a name="618" href="#618">618</a>         } <strong class="jxr_keyword">catch</strong> (WSSecurityException e) {
-<a name="619" href="#619">619</a>             log.error(e);
-<a name="620" href="#620">620</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="621" href="#621">621</a>         }
-<a name="622" href="#622">622</a>         <strong class="jxr_keyword">if</strong> (!compare(getProperties(), token.getProperties())) {
-<a name="623" href="#623">623</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="624" href="#624">624</a>         }
-<a name="625" href="#625">625</a>         <strong class="jxr_keyword">if</strong> (getGeneration() != token.getGeneration()) {
-<a name="626" href="#626">626</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="627" href="#627">627</a>         }
-<a name="628" href="#628">628</a>         <strong class="jxr_keyword">if</strong> (getOffset() != token.getOffset()) {
-<a name="629" href="#629">629</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="630" href="#630">630</a>         }
-<a name="631" href="#631">631</a>         <strong class="jxr_keyword">if</strong> (getLength() != token.getLength()) {
-<a name="632" href="#632">632</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="633" href="#633">633</a>         }
-<a name="634" href="#634">634</a>         <strong class="jxr_keyword">if</strong> (!compare(getLabel(), token.getLabel())) {
-<a name="635" href="#635">635</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="636" href="#636">636</a>         }
-<a name="637" href="#637">637</a>         <strong class="jxr_keyword">if</strong> (!compare(getNonce(), token.getNonce())) {
-<a name="638" href="#638">638</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="639" href="#639">639</a>         }
-<a name="640" href="#640">640</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
-<a name="641" href="#641">641</a>     }
-<a name="642" href="#642">642</a>     
-<a name="643" href="#643">643</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> compare(String item1, String item2) {
-<a name="644" href="#644">644</a>         <strong class="jxr_keyword">if</strong> (item1 == <strong class="jxr_keyword">null</strong> &amp;&amp; item2 != <strong class="jxr_keyword">null</strong>) { 
-<a name="645" href="#645">645</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="646" href="#646">646</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (item1 != <strong class="jxr_keyword">null</strong> &amp;&amp; !item1.equals(item2)) {
-<a name="647" href="#647">647</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="648" href="#648">648</a>         }
-<a name="649" href="#649">649</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
-<a name="650" href="#650">650</a>     }
-<a name="651" href="#651">651</a>     
-<a name="652" href="#652">652</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> compare(Map&lt;String, String&gt; item1, Map&lt;String, String&gt; item2) {
-<a name="653" href="#653">653</a>         <strong class="jxr_keyword">if</strong> (item1 == <strong class="jxr_keyword">null</strong> &amp;&amp; item2 != <strong class="jxr_keyword">null</strong>) { 
-<a name="654" href="#654">654</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="655" href="#655">655</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (item1 != <strong class="jxr_keyword">null</strong> &amp;&amp; !item1.equals(item2)) {
-<a name="656" href="#656">656</a>             <strong class="jxr_keyword">return</strong> false;
-<a name="657" href="#657">657</a>         }
-<a name="658" href="#658">658</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
-<a name="659" href="#659">659</a>     }
-<a name="660" href="#660">660</a> }
+<a name="498" href="#498">498</a>         principal.setAlgorithm(getAlgorithm());
+<a name="499" href="#499">499</a>         
+<a name="500" href="#500">500</a>         String basetokenId = <strong class="jxr_keyword">null</strong>;
+<a name="501" href="#501">501</a>         <a href="../../../../../../org/apache/ws/security/message/token/SecurityTokenReference.html">SecurityTokenReference</a> securityTokenReference = getSecurityTokenReference();
+<a name="502" href="#502">502</a>         <strong class="jxr_keyword">if</strong> (securityTokenReference.containsReference()) {
+<a name="503" href="#503">503</a>             basetokenId = securityTokenReference.getReference().getURI();
+<a name="504" href="#504">504</a>             <strong class="jxr_keyword">if</strong> (basetokenId.charAt(0) == '#') {
+<a name="505" href="#505">505</a>                 basetokenId = basetokenId.substring(1);
+<a name="506" href="#506">506</a>             }
+<a name="507" href="#507">507</a>         } <strong class="jxr_keyword">else</strong> {
+<a name="508" href="#508">508</a>             <em class="jxr_comment">// KeyIdentifier</em>
+<a name="509" href="#509">509</a>             basetokenId = securityTokenReference.getKeyIdentifierValue();
+<a name="510" href="#510">510</a>         }
+<a name="511" href="#511">511</a>         principal.setBasetokenId(basetokenId);
+<a name="512" href="#512">512</a>         
+<a name="513" href="#513">513</a>         <strong class="jxr_keyword">return</strong> principal;
+<a name="514" href="#514">514</a>     }
+<a name="515" href="#515">515</a> 
+<a name="516" href="#516">516</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="517" href="#517">517</a> <em class="jxr_javadoccomment">     * Set the derivation algorithm of this derived key token.</em>
+<a name="518" href="#518">518</a> <em class="jxr_javadoccomment">     *</em>
+<a name="519" href="#519">519</a> <em class="jxr_javadoccomment">     * @param algo the value for the &lt;code&gt;Algorithm&lt;/code&gt; attribute of this</em>
+<a name="520" href="#520">520</a> <em class="jxr_javadoccomment">     *             DerivedKeyToken</em>
+<a name="521" href="#521">521</a> <em class="jxr_javadoccomment">     */</em>
+<a name="522" href="#522">522</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setAlgorithm(String algo) {
+<a name="523" href="#523">523</a>         element.setAttributeNS(ns, <span class="jxr_string">"Algorithm"</span>, algo);
+<a name="524" href="#524">524</a>     }
+<a name="525" href="#525">525</a>     
+<a name="526" href="#526">526</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="527" href="#527">527</a> <em class="jxr_javadoccomment">     * Derive a key from this DerivedKeyToken instance</em>
+<a name="528" href="#528">528</a> <em class="jxr_javadoccomment">     * @param length</em>
+<a name="529" href="#529">529</a> <em class="jxr_javadoccomment">     * @param secret</em>
+<a name="530" href="#530">530</a> <em class="jxr_javadoccomment">     * @throws WSSecurityException</em>
+<a name="531" href="#531">531</a> <em class="jxr_javadoccomment">     */</em>
+<a name="532" href="#532">532</a>     <strong class="jxr_keyword">public</strong> byte[] deriveKey(<strong class="jxr_keyword">int</strong> length, byte[] secret) <strong class="jxr_keyword">throws</strong> WSSecurityException {
+<a name="533" href="#533">533</a>         <strong class="jxr_keyword">try</strong> {
+<a name="534" href="#534">534</a>             <a href="../../../../../../org/apache/ws/security/conversation/ConversationConstants.html">DerivationAlgorithm</a> algo = AlgoFactory.getInstance(getAlgorithm());
+<a name="535" href="#535">535</a>             byte[] labelBytes = <strong class="jxr_keyword">null</strong>;
+<a name="536" href="#536">536</a>             String label = getLabel();
+<a name="537" href="#537">537</a>             <strong class="jxr_keyword">if</strong> (label == <strong class="jxr_keyword">null</strong> || label.length() == 0) {
+<a name="538" href="#538">538</a>                 labelBytes = 
+<a name="539" href="#539">539</a>                     (ConversationConstants.DEFAULT_LABEL 
+<a name="540" href="#540">540</a>                         + ConversationConstants.DEFAULT_LABEL).getBytes(<span class="jxr_string">"UTF-8"</span>);
+<a name="541" href="#541">541</a>             } <strong class="jxr_keyword">else</strong> {
+<a name="542" href="#542">542</a>                 labelBytes = label.getBytes(<span class="jxr_string">"UTF-8"</span>);
+<a name="543" href="#543">543</a>             }
+<a name="544" href="#544">544</a>             
+<a name="545" href="#545">545</a>             byte[] nonce = Base64.decode(getNonce());
+<a name="546" href="#546">546</a>             byte[] seed = <strong class="jxr_keyword">new</strong> byte[labelBytes.length + nonce.length];
+<a name="547" href="#547">547</a>             System.arraycopy(labelBytes, 0, seed, 0, labelBytes.length);
+<a name="548" href="#548">548</a>             System.arraycopy(nonce, 0, seed, labelBytes.length, nonce.length);
+<a name="549" href="#549">549</a>             
+<a name="550" href="#550">550</a>             <strong class="jxr_keyword">if</strong> (length &lt;= 0) {
+<a name="551" href="#551">551</a>                 length = getLength();
+<a name="552" href="#552">552</a>             }
+<a name="553" href="#553">553</a>             <strong class="jxr_keyword">return</strong> algo.createKey(secret, seed, getOffset(), length);
+<a name="554" href="#554">554</a>             
+<a name="555" href="#555">555</a>         } <strong class="jxr_keyword">catch</strong> (Exception e) {
+<a name="556" href="#556">556</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="557" href="#557">557</a>                 WSSecurityException.FAILURE, <strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>, e
+<a name="558" href="#558">558</a>             );
+<a name="559" href="#559">559</a>         }
+<a name="560" href="#560">560</a>     }
+<a name="561" href="#561">561</a>     
+<a name="562" href="#562">562</a>     @Override
+<a name="563" href="#563">563</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> hashCode() {
+<a name="564" href="#564">564</a>         <strong class="jxr_keyword">int</strong> result = 17;
+<a name="565" href="#565">565</a>         String algorithm = getAlgorithm();
+<a name="566" href="#566">566</a>         <strong class="jxr_keyword">if</strong> (algorithm != <strong class="jxr_keyword">null</strong>) {
+<a name="567" href="#567">567</a>             result = 31 * result + algorithm.hashCode();
+<a name="568" href="#568">568</a>         }
+<a name="569" href="#569">569</a>         <strong class="jxr_keyword">try</strong> {
+<a name="570" href="#570">570</a>             <a href="../../../../../../org/apache/ws/security/message/token/SecurityTokenReference.html">SecurityTokenReference</a> tokenReference = getSecurityTokenReference();
+<a name="571" href="#571">571</a>             <strong class="jxr_keyword">if</strong> (tokenReference != <strong class="jxr_keyword">null</strong>) {
+<a name="572" href="#572">572</a>                 result = 31 * result + tokenReference.hashCode();
+<a name="573" href="#573">573</a>             }
+<a name="574" href="#574">574</a>         } <strong class="jxr_keyword">catch</strong> (WSSecurityException e) {
+<a name="575" href="#575">575</a>             log.error(e);
+<a name="576" href="#576">576</a>         }
+<a name="577" href="#577">577</a>         
+<a name="578" href="#578">578</a>         Map&lt;String, String&gt; properties = getProperties();
+<a name="579" href="#579">579</a>         <strong class="jxr_keyword">if</strong> (properties != <strong class="jxr_keyword">null</strong>) {
+<a name="580" href="#580">580</a>             result = 31 * result + properties.hashCode();
+<a name="581" href="#581">581</a>         }
+<a name="582" href="#582">582</a>         <strong class="jxr_keyword">int</strong> generation = getGeneration();
+<a name="583" href="#583">583</a>         <strong class="jxr_keyword">if</strong> (generation != -1) {
+<a name="584" href="#584">584</a>             result = 31 * result + generation;
+<a name="585" href="#585">585</a>         }
+<a name="586" href="#586">586</a>         <strong class="jxr_keyword">int</strong> offset = getOffset();
+<a name="587" href="#587">587</a>         <strong class="jxr_keyword">if</strong> (offset != -1) {
+<a name="588" href="#588">588</a>             result = 31 * result + offset;
+<a name="589" href="#589">589</a>         }
+<a name="590" href="#590">590</a>         <strong class="jxr_keyword">int</strong> length = getLength();
+<a name="591" href="#591">591</a>         <strong class="jxr_keyword">if</strong> (length != -1) {
+<a name="592" href="#592">592</a>             result = 31 * result + length;
+<a name="593" href="#593">593</a>         }
+<a name="594" href="#594">594</a>         String label = getLabel();
+<a name="595" href="#595">595</a>         <strong class="jxr_keyword">if</strong> (label != <strong class="jxr_keyword">null</strong>) {
+<a name="596" href="#596">596</a>             result = 31 * result + label.hashCode();
+<a name="597" href="#597">597</a>         }
+<a name="598" href="#598">598</a>         String nonce = getNonce();
+<a name="599" href="#599">599</a>         <strong class="jxr_keyword">if</strong> (nonce != <strong class="jxr_keyword">null</strong>) {
+<a name="600" href="#600">600</a>             result = 31 * result + nonce.hashCode();
+<a name="601" href="#601">601</a>         }
+<a name="602" href="#602">602</a>         
+<a name="603" href="#603">603</a>         <strong class="jxr_keyword">return</strong> result;
+<a name="604" href="#604">604</a>     }
+<a name="605" href="#605">605</a>     
+<a name="606" href="#606">606</a>     @Override
+<a name="607" href="#607">607</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> equals(Object object) {
+<a name="608" href="#608">608</a>         <strong class="jxr_keyword">if</strong> (!(object instanceof DerivedKeyToken)) {
+<a name="609" href="#609">609</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="610" href="#610">610</a>         }
+<a name="611" href="#611">611</a>         <a href="../../../../../../org/apache/ws/security/message/token/DerivedKeyToken.html">DerivedKeyToken</a> token = (DerivedKeyToken)object;
+<a name="612" href="#612">612</a>         <strong class="jxr_keyword">if</strong> (!compare(getAlgorithm(), token.getAlgorithm())) {
+<a name="613" href="#613">613</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="614" href="#614">614</a>         }
+<a name="615" href="#615">615</a>         <strong class="jxr_keyword">try</strong> {
+<a name="616" href="#616">616</a>             <strong class="jxr_keyword">if</strong> (!getSecurityTokenReference().equals(token.getSecurityTokenReference())) {
+<a name="617" href="#617">617</a>                 <strong class="jxr_keyword">return</strong> false;
+<a name="618" href="#618">618</a>             }
+<a name="619" href="#619">619</a>         } <strong class="jxr_keyword">catch</strong> (WSSecurityException e) {
+<a name="620" href="#620">620</a>             log.error(e);
+<a name="621" href="#621">621</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="622" href="#622">622</a>         }
+<a name="623" href="#623">623</a>         <strong class="jxr_keyword">if</strong> (!compare(getProperties(), token.getProperties())) {
+<a name="624" href="#624">624</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="625" href="#625">625</a>         }
+<a name="626" href="#626">626</a>         <strong class="jxr_keyword">if</strong> (getGeneration() != token.getGeneration()) {
+<a name="627" href="#627">627</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="628" href="#628">628</a>         }
+<a name="629" href="#629">629</a>         <strong class="jxr_keyword">if</strong> (getOffset() != token.getOffset()) {
+<a name="630" href="#630">630</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="631" href="#631">631</a>         }
+<a name="632" href="#632">632</a>         <strong class="jxr_keyword">if</strong> (getLength() != token.getLength()) {
+<a name="633" href="#633">633</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="634" href="#634">634</a>         }
+<a name="635" href="#635">635</a>         <strong class="jxr_keyword">if</strong> (!compare(getLabel(), token.getLabel())) {
+<a name="636" href="#636">636</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="637" href="#637">637</a>         }
+<a name="638" href="#638">638</a>         <strong class="jxr_keyword">if</strong> (!compare(getNonce(), token.getNonce())) {
+<a name="639" href="#639">639</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="640" href="#640">640</a>         }
+<a name="641" href="#641">641</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a name="642" href="#642">642</a>     }
+<a name="643" href="#643">643</a>     
+<a name="644" href="#644">644</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> compare(String item1, String item2) {
+<a name="645" href="#645">645</a>         <strong class="jxr_keyword">if</strong> (item1 == <strong class="jxr_keyword">null</strong> &amp;&amp; item2 != <strong class="jxr_keyword">null</strong>) { 
+<a name="646" href="#646">646</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="647" href="#647">647</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (item1 != <strong class="jxr_keyword">null</strong> &amp;&amp; !item1.equals(item2)) {
+<a name="648" href="#648">648</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="649" href="#649">649</a>         }
+<a name="650" href="#650">650</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a name="651" href="#651">651</a>     }
+<a name="652" href="#652">652</a>     
+<a name="653" href="#653">653</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> compare(Map&lt;String, String&gt; item1, Map&lt;String, String&gt; item2) {
+<a name="654" href="#654">654</a>         <strong class="jxr_keyword">if</strong> (item1 == <strong class="jxr_keyword">null</strong> &amp;&amp; item2 != <strong class="jxr_keyword">null</strong>) { 
+<a name="655" href="#655">655</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="656" href="#656">656</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (item1 != <strong class="jxr_keyword">null</strong> &amp;&amp; !item1.equals(item2)) {
+<a name="657" href="#657">657</a>             <strong class="jxr_keyword">return</strong> false;
+<a name="658" href="#658">658</a>         }
+<a name="659" href="#659">659</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a name="660" href="#660">660</a>     }
+<a name="661" href="#661">661</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/token/TokenElementCallback.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/token/TokenElementCallback.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/token/TokenElementCallback.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/token/TokenElementCallback.html Tue Dec  4 12:48:10 2012
@@ -53,7 +53,7 @@
 <a name="43" href="#43">43</a>  
 <a name="44" href="#44">44</a>      <em class="jxr_javadoccomment">/**</em>
 <a name="45" href="#45">45</a>  <em class="jxr_javadoccomment">     * Set the token element</em>
-<a name="46" href="#46">46</a>  <em class="jxr_javadoccomment">     * @param the token element</em>
+<a name="46" href="#46">46</a>  <em class="jxr_javadoccomment">     * @param element the token element</em>
 <a name="47" href="#47">47</a>  <em class="jxr_javadoccomment">     */</em>
 <a name="48" href="#48">48</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setTokenElement(Element element) {
 <a name="49" href="#49">49</a>          <strong class="jxr_keyword">this</strong>.element = element;

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html Tue Dec  4 12:48:10 2012
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
 	<head>
 		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
-		<title>WSS4J 1.6.7 Reference Package org.apache.ws.security.message.token</title>
+		<title>Apache WSS4J 1.6.8 Reference Package org.apache.ws.security.message.token</title>
 		<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" />
 	</head>
 	<body>

Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html Tue Dec  4 12:48:10 2012
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
 	<head>
 		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
-		<title>WSS4J 1.6.7 Reference Package org.apache.ws.security.message.token</title>
+		<title>Apache WSS4J 1.6.8 Reference Package org.apache.ws.security.message.token</title>
 		<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" />
 	</head>
 	<body>

Modified: webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html Tue Dec  4 12:48:10 2012
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
 	<head>
 		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
-		<title>WSS4J 1.6.7 Reference Package org.apache.ws.security</title>
+		<title>Apache WSS4J 1.6.8 Reference Package org.apache.ws.security</title>
 		<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
 	</head>
 	<body>

Modified: webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html Tue Dec  4 12:48:10 2012
@@ -3,7 +3,7 @@
 <html xml:lang="en" lang="en">
 	<head>
 		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
-		<title>WSS4J 1.6.7 Reference Package org.apache.ws.security</title>
+		<title>Apache WSS4J 1.6.8 Reference Package org.apache.ws.security</title>
 		<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
 	</head>
 	<body>

Modified: webservices/wss4j/site/xref/org/apache/ws/security/processor/BinarySecurityTokenProcessor.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/processor/BinarySecurityTokenProcessor.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/processor/BinarySecurityTokenProcessor.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/processor/BinarySecurityTokenProcessor.html Tue Dec  4 12:48:10 2012
@@ -115,59 +115,60 @@
 <a name="105" href="#105">105</a>             } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (certs != <strong class="jxr_keyword">null</strong> &amp;&amp; certs[0] != <strong class="jxr_keyword">null</strong>) {
 <a name="106" href="#106">106</a>                 result.put(WSSecurityEngineResult.TAG_PRINCIPAL, certs[0].getSubjectX500Principal());
 <a name="107" href="#107">107</a>             }
-<a name="108" href="#108">108</a>         }
-<a name="109" href="#109">109</a>         
-<a name="110" href="#110">110</a>         wsDocInfo.addResult(result);
-<a name="111" href="#111">111</a>         <strong class="jxr_keyword">return</strong> java.util.Collections.singletonList(result);
-<a name="112" href="#112">112</a>     }
-<a name="113" href="#113">113</a>     
-<a name="114" href="#114">114</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="115" href="#115">115</a> <em class="jxr_javadoccomment">     * Extracts the certificate(s) from the Binary Security token reference.</em>
-<a name="116" href="#116">116</a> <em class="jxr_javadoccomment">     *</em>
-<a name="117" href="#117">117</a> <em class="jxr_javadoccomment">     * @param token The BinarySecurity instance corresponding to either X509Security or </em>
-<a name="118" href="#118">118</a> <em class="jxr_javadoccomment">     *              PKIPathSecurity</em>
-<a name="119" href="#119">119</a> <em class="jxr_javadoccomment">     * @return The X509Certificates associated with this reference</em>
-<a name="120" href="#120">120</a> <em class="jxr_javadoccomment">     * @throws WSSecurityException</em>
-<a name="121" href="#121">121</a> <em class="jxr_javadoccomment">     */</em>
-<a name="122" href="#122">122</a>     <strong class="jxr_keyword">private</strong> X509Certificate[] getCertificatesTokenReference(<a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> token, <a href="../../../../../org/apache/ws/security/components/crypto/Crypto.html">Crypto</a> crypto)
-<a name="123" href="#123">123</a>         <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> {
-<a name="124" href="#124">124</a>         <strong class="jxr_keyword">if</strong> (token instanceof PKIPathSecurity) {
-<a name="125" href="#125">125</a>             <strong class="jxr_keyword">return</strong> ((PKIPathSecurity) token).getX509Certificates(crypto);
-<a name="126" href="#126">126</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (token instanceof X509Security) {
-<a name="127" href="#127">127</a>             X509Certificate cert = ((X509Security) token).getX509Certificate(crypto);
-<a name="128" href="#128">128</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> X509Certificate[]{cert};
-<a name="129" href="#129">129</a>         }
-<a name="130" href="#130">130</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
-<a name="131" href="#131">131</a>     }
-<a name="132" href="#132">132</a> 
-<a name="133" href="#133">133</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="134" href="#134">134</a> <em class="jxr_javadoccomment">     * Checks the &lt;code&gt;element&lt;/code&gt; and creates appropriate binary security object.</em>
-<a name="135" href="#135">135</a> <em class="jxr_javadoccomment">     *</em>
-<a name="136" href="#136">136</a> <em class="jxr_javadoccomment">     * @param element The XML element that contains either a &lt;code&gt;BinarySecurityToken</em>
-<a name="137" href="#137">137</a> <em class="jxr_javadoccomment">     *                &lt;/code&gt; or a &lt;code&gt;PKIPath&lt;/code&gt; element.</em>
-<a name="138" href="#138">138</a> <em class="jxr_javadoccomment">     * @param config A WSSConfig instance</em>
-<a name="139" href="#139">139</a> <em class="jxr_javadoccomment">     * @return a BinarySecurity token element</em>
-<a name="140" href="#140">140</a> <em class="jxr_javadoccomment">     * @throws WSSecurityException</em>
-<a name="141" href="#141">141</a> <em class="jxr_javadoccomment">     */</em>
-<a name="142" href="#142">142</a>     <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> createSecurityToken(
-<a name="143" href="#143">143</a>         Element element,
-<a name="144" href="#144">144</a>         <a href="../../../../../org/apache/ws/security/WSSConfig.html">WSSConfig</a> config
-<a name="145" href="#145">145</a>     ) <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> {
-<a name="146" href="#146">146</a>         String type = element.getAttribute(<span class="jxr_string">"ValueType"</span>);
-<a name="147" href="#147">147</a>         <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> token = <strong class="jxr_keyword">null</strong>;
-<a name="148" href="#148">148</a>         <strong class="jxr_keyword">if</strong> (X509Security.X509_V3_TYPE.equals(type)) {
-<a name="149" href="#149">149</a>             token = <strong class="jxr_keyword">new</strong> X509Security(element, config.isWsiBSPCompliant());
-<a name="150" href="#150">150</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (PKIPathSecurity.getType().equals(type)) {
-<a name="151" href="#151">151</a>             token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/PKIPathSecurity.html">PKIPathSecurity</a>(element, config.isWsiBSPCompliant());
-<a name="152" href="#152">152</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (KerberosSecurity.isKerberosToken(type)) {
-<a name="153" href="#153">153</a>             token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/KerberosSecurity.html">KerberosSecurity</a>(element, config.isWsiBSPCompliant());
-<a name="154" href="#154">154</a>         } <strong class="jxr_keyword">else</strong> {
-<a name="155" href="#155">155</a>             token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a>(element, config.isWsiBSPCompliant());
-<a name="156" href="#156">156</a>         }
-<a name="157" href="#157">157</a>         <strong class="jxr_keyword">return</strong> token;
-<a name="158" href="#158">158</a>     }
-<a name="159" href="#159">159</a>     
-<a name="160" href="#160">160</a> }
+<a name="108" href="#108">108</a>             result.put(WSSecurityEngineResult.TAG_SUBJECT, credential.getSubject());
+<a name="109" href="#109">109</a>         }
+<a name="110" href="#110">110</a>         
+<a name="111" href="#111">111</a>         wsDocInfo.addResult(result);
+<a name="112" href="#112">112</a>         <strong class="jxr_keyword">return</strong> java.util.Collections.singletonList(result);
+<a name="113" href="#113">113</a>     }
+<a name="114" href="#114">114</a>     
+<a name="115" href="#115">115</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="116" href="#116">116</a> <em class="jxr_javadoccomment">     * Extracts the certificate(s) from the Binary Security token reference.</em>
+<a name="117" href="#117">117</a> <em class="jxr_javadoccomment">     *</em>
+<a name="118" href="#118">118</a> <em class="jxr_javadoccomment">     * @param token The BinarySecurity instance corresponding to either X509Security or </em>
+<a name="119" href="#119">119</a> <em class="jxr_javadoccomment">     *              PKIPathSecurity</em>
+<a name="120" href="#120">120</a> <em class="jxr_javadoccomment">     * @return The X509Certificates associated with this reference</em>
+<a name="121" href="#121">121</a> <em class="jxr_javadoccomment">     * @throws WSSecurityException</em>
+<a name="122" href="#122">122</a> <em class="jxr_javadoccomment">     */</em>
+<a name="123" href="#123">123</a>     <strong class="jxr_keyword">private</strong> X509Certificate[] getCertificatesTokenReference(<a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> token, <a href="../../../../../org/apache/ws/security/components/crypto/Crypto.html">Crypto</a> crypto)
+<a name="124" href="#124">124</a>         <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> {
+<a name="125" href="#125">125</a>         <strong class="jxr_keyword">if</strong> (token instanceof PKIPathSecurity) {
+<a name="126" href="#126">126</a>             <strong class="jxr_keyword">return</strong> ((PKIPathSecurity) token).getX509Certificates(crypto);
+<a name="127" href="#127">127</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (token instanceof X509Security) {
+<a name="128" href="#128">128</a>             X509Certificate cert = ((X509Security) token).getX509Certificate(crypto);
+<a name="129" href="#129">129</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> X509Certificate[]{cert};
+<a name="130" href="#130">130</a>         }
+<a name="131" href="#131">131</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
+<a name="132" href="#132">132</a>     }
+<a name="133" href="#133">133</a> 
+<a name="134" href="#134">134</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="135" href="#135">135</a> <em class="jxr_javadoccomment">     * Checks the &lt;code&gt;element&lt;/code&gt; and creates appropriate binary security object.</em>
+<a name="136" href="#136">136</a> <em class="jxr_javadoccomment">     *</em>
+<a name="137" href="#137">137</a> <em class="jxr_javadoccomment">     * @param element The XML element that contains either a &lt;code&gt;BinarySecurityToken</em>
+<a name="138" href="#138">138</a> <em class="jxr_javadoccomment">     *                &lt;/code&gt; or a &lt;code&gt;PKIPath&lt;/code&gt; element.</em>
+<a name="139" href="#139">139</a> <em class="jxr_javadoccomment">     * @param config A WSSConfig instance</em>
+<a name="140" href="#140">140</a> <em class="jxr_javadoccomment">     * @return a BinarySecurity token element</em>
+<a name="141" href="#141">141</a> <em class="jxr_javadoccomment">     * @throws WSSecurityException</em>
+<a name="142" href="#142">142</a> <em class="jxr_javadoccomment">     */</em>
+<a name="143" href="#143">143</a>     <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> createSecurityToken(
+<a name="144" href="#144">144</a>         Element element,
+<a name="145" href="#145">145</a>         <a href="../../../../../org/apache/ws/security/WSSConfig.html">WSSConfig</a> config
+<a name="146" href="#146">146</a>     ) <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> {
+<a name="147" href="#147">147</a>         String type = element.getAttribute(<span class="jxr_string">"ValueType"</span>);
+<a name="148" href="#148">148</a>         <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> token = <strong class="jxr_keyword">null</strong>;
+<a name="149" href="#149">149</a>         <strong class="jxr_keyword">if</strong> (X509Security.X509_V3_TYPE.equals(type)) {
+<a name="150" href="#150">150</a>             token = <strong class="jxr_keyword">new</strong> X509Security(element, config.isWsiBSPCompliant());
+<a name="151" href="#151">151</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (PKIPathSecurity.getType().equals(type)) {
+<a name="152" href="#152">152</a>             token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/PKIPathSecurity.html">PKIPathSecurity</a>(element, config.isWsiBSPCompliant());
+<a name="153" href="#153">153</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (KerberosSecurity.isKerberosToken(type)) {
+<a name="154" href="#154">154</a>             token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/KerberosSecurity.html">KerberosSecurity</a>(element, config.isWsiBSPCompliant());
+<a name="155" href="#155">155</a>         } <strong class="jxr_keyword">else</strong> {
+<a name="156" href="#156">156</a>             token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a>(element, config.isWsiBSPCompliant());
+<a name="157" href="#157">157</a>         }
+<a name="158" href="#158">158</a>         <strong class="jxr_keyword">return</strong> token;
+<a name="159" href="#159">159</a>     }
+<a name="160" href="#160">160</a>     
+<a name="161" href="#161">161</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/processor/DerivedKeyTokenProcessor.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/processor/DerivedKeyTokenProcessor.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/processor/DerivedKeyTokenProcessor.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/processor/DerivedKeyTokenProcessor.html Tue Dec  4 12:48:10 2012
@@ -29,64 +29,76 @@
 <a name="19" href="#19">19</a>  
 <a name="20" href="#20">20</a>  <strong class="jxr_keyword">package</strong> org.apache.ws.security.processor;
 <a name="21" href="#21">21</a>  
-<a name="22" href="#22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.WSConstants;
-<a name="23" href="#23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.WSDocInfo;
-<a name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.WSSecurityEngineResult;
-<a name="25" href="#25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.WSSecurityException;
-<a name="26" href="#26">26</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.handler.RequestData;
-<a name="27" href="#27">27</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.message.token.DerivedKeyToken;
-<a name="28" href="#28">28</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.str.DerivedKeyTokenSTRParser;
-<a name="29" href="#29">29</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.str.STRParser;
-<a name="30" href="#30">30</a>  <strong class="jxr_keyword">import</strong> org.w3c.dom.Element;
-<a name="31" href="#31">31</a>  
-<a name="32" href="#32">32</a>  
-<a name="33" href="#33">33</a>  <strong class="jxr_keyword">import</strong> java.util.List;
-<a name="34" href="#34">34</a>  
-<a name="35" href="#35">35</a>  <em class="jxr_javadoccomment">/**</em>
-<a name="36" href="#36">36</a>  <em class="jxr_javadoccomment"> * The processor to process &lt;code&gt;wsc:DerivedKeyToken&lt;/code&gt;.</em>
-<a name="37" href="#37">37</a>  <em class="jxr_javadoccomment"> * </em>
-<a name="38" href="#38">38</a>  <em class="jxr_javadoccomment"> * @author Ruchith Fernando (ruchith.fernando@gmail.com)</em>
-<a name="39" href="#39">39</a>  <em class="jxr_javadoccomment"> */</em>
-<a name="40" href="#40">40</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/ws/security/processor/DerivedKeyTokenProcessor.html">DerivedKeyTokenProcessor</a> implements <a href="../../../../../org/apache/ws/security/processor/Processor.html">Processor</a> {
-<a name="41" href="#41">41</a>      
-<a name="42" href="#42">42</a>      <strong class="jxr_keyword">public</strong> List&lt;WSSecurityEngineResult&gt; handleToken(
-<a name="43" href="#43">43</a>          Element elem, 
-<a name="44" href="#44">44</a>          <a href="../../../../../org/apache/ws/security/handler/RequestData.html">RequestData</a> data, 
-<a name="45" href="#45">45</a>          <a href="../../../../../org/apache/ws/security/WSDocInfo.html">WSDocInfo</a> wsDocInfo
-<a name="46" href="#46">46</a>      ) <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> {
-<a name="47" href="#47">47</a>          <em class="jxr_comment">// Deserialize the DKT</em>
-<a name="48" href="#48">48</a>          <a href="../../../../../org/apache/ws/security/message/token/DerivedKeyToken.html">DerivedKeyToken</a> dkt = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/DerivedKeyToken.html">DerivedKeyToken</a>(elem, data.getWssConfig().isWsiBSPCompliant());
-<a name="49" href="#49">49</a>          byte[] secret = <strong class="jxr_keyword">null</strong>;
-<a name="50" href="#50">50</a>          Element secRefElement = dkt.getSecurityTokenReferenceElement();
-<a name="51" href="#51">51</a>          <strong class="jxr_keyword">if</strong> (secRefElement != <strong class="jxr_keyword">null</strong>) {
-<a name="52" href="#52">52</a>              <a href="../../../../../org/apache/ws/security/str/STRParser.html">STRParser</a> strParser = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/str/DerivedKeyTokenSTRParser.html">DerivedKeyTokenSTRParser</a>();
-<a name="53" href="#53">53</a>              strParser.parseSecurityTokenReference(
-<a name="54" href="#54">54</a>                  secRefElement, data, wsDocInfo, <strong class="jxr_keyword">null</strong>
-<a name="55" href="#55">55</a>              );
-<a name="56" href="#56">56</a>              secret = strParser.getSecretKey();
-<a name="57" href="#57">57</a>          } <strong class="jxr_keyword">else</strong> {
-<a name="58" href="#58">58</a>              <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(WSSecurityException.FAILED_CHECK, <span class="jxr_string">"noReference"</span>);
+<a name="22" href="#22">22</a>  <strong class="jxr_keyword">import</strong> java.util.List;
+<a name="23" href="#23">23</a>  
+<a name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.WSConstants;
+<a name="25" href="#25">25</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.WSDocInfo;
+<a name="26" href="#26">26</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.WSSecurityEngineResult;
+<a name="27" href="#27">27</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.WSSecurityException;
+<a name="28" href="#28">28</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.components.crypto.AlgorithmSuite;
+<a name="29" href="#29">29</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.components.crypto.AlgorithmSuiteValidator;
+<a name="30" href="#30">30</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.handler.RequestData;
+<a name="31" href="#31">31</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.message.token.DerivedKeyToken;
+<a name="32" href="#32">32</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.str.DerivedKeyTokenSTRParser;
+<a name="33" href="#33">33</a>  <strong class="jxr_keyword">import</strong> org.apache.ws.security.str.STRParser;
+<a name="34" href="#34">34</a>  <strong class="jxr_keyword">import</strong> org.w3c.dom.Element;
+<a name="35" href="#35">35</a>  
+<a name="36" href="#36">36</a>  <em class="jxr_javadoccomment">/**</em>
+<a name="37" href="#37">37</a>  <em class="jxr_javadoccomment"> * The processor to process &lt;code&gt;wsc:DerivedKeyToken&lt;/code&gt;.</em>
+<a name="38" href="#38">38</a>  <em class="jxr_javadoccomment"> * </em>
+<a name="39" href="#39">39</a>  <em class="jxr_javadoccomment"> * @author Ruchith Fernando (ruchith.fernando@gmail.com)</em>
+<a name="40" href="#40">40</a>  <em class="jxr_javadoccomment"> */</em>
+<a name="41" href="#41">41</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/ws/security/processor/DerivedKeyTokenProcessor.html">DerivedKeyTokenProcessor</a> implements <a href="../../../../../org/apache/ws/security/processor/Processor.html">Processor</a> {
+<a name="42" href="#42">42</a>      
+<a name="43" href="#43">43</a>      <strong class="jxr_keyword">public</strong> List&lt;WSSecurityEngineResult&gt; handleToken(
+<a name="44" href="#44">44</a>          Element elem, 
+<a name="45" href="#45">45</a>          <a href="../../../../../org/apache/ws/security/handler/RequestData.html">RequestData</a> data, 
+<a name="46" href="#46">46</a>          <a href="../../../../../org/apache/ws/security/WSDocInfo.html">WSDocInfo</a> wsDocInfo
+<a name="47" href="#47">47</a>      ) <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> {
+<a name="48" href="#48">48</a>          <em class="jxr_comment">// Deserialize the DKT</em>
+<a name="49" href="#49">49</a>          <a href="../../../../../org/apache/ws/security/message/token/DerivedKeyToken.html">DerivedKeyToken</a> dkt = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/DerivedKeyToken.html">DerivedKeyToken</a>(elem, data.getWssConfig().isWsiBSPCompliant());
+<a name="50" href="#50">50</a>          
+<a name="51" href="#51">51</a>          <em class="jxr_comment">// Check for compliance against the defined AlgorithmSuite</em>
+<a name="52" href="#52">52</a>          <a href="../../../../../org/apache/ws/security/components/crypto/AlgorithmSuite.html">AlgorithmSuite</a> algorithmSuite = data.getAlgorithmSuite();
+<a name="53" href="#53">53</a>          <strong class="jxr_keyword">if</strong> (algorithmSuite != <strong class="jxr_keyword">null</strong>) {
+<a name="54" href="#54">54</a>              <a href="../../../../../org/apache/ws/security/components/crypto/AlgorithmSuiteValidator.html">AlgorithmSuiteValidator</a> algorithmSuiteValidator = <strong class="jxr_keyword">new</strong>
+<a name="55" href="#55">55</a>                  <a href="../../../../../org/apache/ws/security/components/crypto/AlgorithmSuiteValidator.html">AlgorithmSuiteValidator</a>(algorithmSuite);
+<a name="56" href="#56">56</a>              algorithmSuiteValidator.checkDerivedKeyAlgorithm(
+<a name="57" href="#57">57</a>                  dkt.getAlgorithm()
+<a name="58" href="#58">58</a>              );
 <a name="59" href="#59">59</a>          }
 <a name="60" href="#60">60</a>          
-<a name="61" href="#61">61</a>          String tempNonce = dkt.getNonce();
-<a name="62" href="#62">62</a>          <strong class="jxr_keyword">if</strong> (tempNonce == <strong class="jxr_keyword">null</strong>) {
-<a name="63" href="#63">63</a>              <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(<span class="jxr_string">"Missing wsc:Nonce value"</span>);
-<a name="64" href="#64">64</a>          }
-<a name="65" href="#65">65</a>          <strong class="jxr_keyword">int</strong> length = dkt.getLength();
-<a name="66" href="#66">66</a>          byte[] keyBytes = dkt.deriveKey(length, secret);
-<a name="67" href="#67">67</a>          <a href="../../../../../org/apache/ws/security/WSSecurityEngineResult.html">WSSecurityEngineResult</a> result =
-<a name="68" href="#68">68</a>              <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityEngineResult.html">WSSecurityEngineResult</a>(WSConstants.DKT, <strong class="jxr_keyword">null</strong>, keyBytes, <strong class="jxr_keyword">null</strong>);
-<a name="69" href="#69">69</a>          wsDocInfo.addTokenElement(elem);
-<a name="70" href="#70">70</a>          result.put(WSSecurityEngineResult.TAG_ID, dkt.getID());
-<a name="71" href="#71">71</a>          result.put(WSSecurityEngineResult.TAG_DERIVED_KEY_TOKEN, dkt);
-<a name="72" href="#72">72</a>          result.put(WSSecurityEngineResult.TAG_SECRET, secret);
-<a name="73" href="#73">73</a>          result.put(WSSecurityEngineResult.TAG_TOKEN_ELEMENT, dkt.getElement());
-<a name="74" href="#74">74</a>          wsDocInfo.addResult(result);
-<a name="75" href="#75">75</a>          <strong class="jxr_keyword">return</strong> java.util.Collections.singletonList(result);
-<a name="76" href="#76">76</a>      }
-<a name="77" href="#77">77</a>  
-<a name="78" href="#78">78</a>  
-<a name="79" href="#79">79</a>  }
+<a name="61" href="#61">61</a>          byte[] secret = <strong class="jxr_keyword">null</strong>;
+<a name="62" href="#62">62</a>          Element secRefElement = dkt.getSecurityTokenReferenceElement();
+<a name="63" href="#63">63</a>          <strong class="jxr_keyword">if</strong> (secRefElement != <strong class="jxr_keyword">null</strong>) {
+<a name="64" href="#64">64</a>              <a href="../../../../../org/apache/ws/security/str/STRParser.html">STRParser</a> strParser = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/str/DerivedKeyTokenSTRParser.html">DerivedKeyTokenSTRParser</a>();
+<a name="65" href="#65">65</a>              strParser.parseSecurityTokenReference(
+<a name="66" href="#66">66</a>                  secRefElement, data, wsDocInfo, <strong class="jxr_keyword">null</strong>
+<a name="67" href="#67">67</a>              );
+<a name="68" href="#68">68</a>              secret = strParser.getSecretKey();
+<a name="69" href="#69">69</a>          } <strong class="jxr_keyword">else</strong> {
+<a name="70" href="#70">70</a>              <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(WSSecurityException.FAILED_CHECK, <span class="jxr_string">"noReference"</span>);
+<a name="71" href="#71">71</a>          }
+<a name="72" href="#72">72</a>          
+<a name="73" href="#73">73</a>          String tempNonce = dkt.getNonce();
+<a name="74" href="#74">74</a>          <strong class="jxr_keyword">if</strong> (tempNonce == <strong class="jxr_keyword">null</strong>) {
+<a name="75" href="#75">75</a>              <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>(<span class="jxr_string">"Missing wsc:Nonce value"</span>);
+<a name="76" href="#76">76</a>          }
+<a name="77" href="#77">77</a>          <strong class="jxr_keyword">int</strong> length = dkt.getLength();
+<a name="78" href="#78">78</a>          byte[] keyBytes = dkt.deriveKey(length, secret);
+<a name="79" href="#79">79</a>          <a href="../../../../../org/apache/ws/security/WSSecurityEngineResult.html">WSSecurityEngineResult</a> result =
+<a name="80" href="#80">80</a>              <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityEngineResult.html">WSSecurityEngineResult</a>(WSConstants.DKT, <strong class="jxr_keyword">null</strong>, keyBytes, <strong class="jxr_keyword">null</strong>);
+<a name="81" href="#81">81</a>          wsDocInfo.addTokenElement(elem);
+<a name="82" href="#82">82</a>          result.put(WSSecurityEngineResult.TAG_ID, dkt.getID());
+<a name="83" href="#83">83</a>          result.put(WSSecurityEngineResult.TAG_DERIVED_KEY_TOKEN, dkt);
+<a name="84" href="#84">84</a>          result.put(WSSecurityEngineResult.TAG_SECRET, secret);
+<a name="85" href="#85">85</a>          result.put(WSSecurityEngineResult.TAG_TOKEN_ELEMENT, dkt.getElement());
+<a name="86" href="#86">86</a>          wsDocInfo.addResult(result);
+<a name="87" href="#87">87</a>          <strong class="jxr_keyword">return</strong> java.util.Collections.singletonList(result);
+<a name="88" href="#88">88</a>      }
+<a name="89" href="#89">89</a>  
+<a name="90" href="#90">90</a>  
+<a name="91" href="#91">91</a>  }
 </pre>
 <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
 </html>