Skip navigation links

Oracle Security Developer Tools Web Services Security Java API Reference
11g (11.1.1)

E10678-02


oracle.security.xmlsec.wss.wsc
Class WSCDerivedKeyToken

java.lang.Object
  extended by oracle.security.xmlsec.util.XMLNode
      extended by oracle.security.xmlsec.util.XMLElement
          extended by oracle.security.xmlsec.wss.WSSElement
              extended by oracle.security.xmlsec.wss.wsc.WSCDerivedKeyToken

All Implemented Interfaces:
WSSecurityToken, WSSXMLSecurityToken
Direct Known Subclasses:
WSCDerivedKeyToken.WSCDerivedKeyToken12, WSCDerivedKeyToken.WSCDerivedKeyToken13

public abstract class WSCDerivedKeyToken
extends WSSElement
implements WSSXMLSecurityToken

WS-SecureConversation's DerivedKeyToken element

Since:
release specific (what release of product did this appear in)
Version:
$Header: entsec_ldap/java/src/oracle/security/xmlsec/wss/wsc/WSCDerivedKeyToken.java /main/1 2009/09/11 16:09:01 pdatta Exp $

Nested Class Summary
static class WSCDerivedKeyToken.WSCDerivedKeyToken12
           
static class WSCDerivedKeyToken.WSCDerivedKeyToken13
           

 

Field Summary
static java.lang.String DEFAULT_LABEL
          The default label value, i.e.
static int DEFAULT_LENGTH
          the default length, i.e.

 

Fields inherited from class oracle.security.xmlsec.util.XMLNode
node, systemId

 

Constructor Summary
protected WSCDerivedKeyToken(org.w3c.dom.Document owner, java.lang.String nsURI, java.lang.String localName)
           
protected WSCDerivedKeyToken(org.w3c.dom.Element element)
           
protected WSCDerivedKeyToken(org.w3c.dom.Element element, java.lang.String systemId)
           

 

Method Summary
 javax.crypto.SecretKey deriveKey()
          Wrapper over deriveKey(SecretKey) but gets the SecretKey by calling any registered resolvers
 javax.crypto.SecretKey deriveKey(javax.crypto.SecretKey secret)
          Use the P_SHA1 algorithm to derive the key, but get the value of the parameters from within this token
static javax.crypto.SecretKey deriveKey(javax.crypto.SecretKey secret, byte[] nonce, java.lang.String label, int offset, int length)
          Use the P_SHA1 algorithm to derive a key from the given parameters
 java.lang.Integer getGeneration()
          Get the generation used for key derivation
 java.lang.String getLabel()
          Get the label used to derive the key, if there is no label set it returns null but for key derivation it uses a default label of "WS-SecureConversationWS-SecureConversation"
 java.lang.Integer getLength()
          Get the length used for key derivation
 byte[] getNonce()
          Get the nonce used for key derivation
protected abstract  java.lang.String[] getNsURIs()
           
 java.lang.Integer getOffset()
          Get the offset used for key derivation
 WSSecurityTokenReference getSecurityTokenReference()
          Get the SecurityTokenReference embedded inside this DerivedKeyToken
 java.lang.Object getToken()
          Returns the underlying token.
 oracle.security.xmlsec.util.QName getTokenName()
          Returns the QName of the security token.
 void setGeneration(java.lang.Integer generation)
          Set the generation for key derivation
 void setLabel(java.lang.String label)
          Set the label used to set the key, call with null to remove the label
 void setLength(java.lang.Integer length)
          Set the length for key derivation
 void setNonce(byte[] nonce)
          Set the nonce for key derivation
 void setOffset(java.lang.Integer offset)
          Set the offset for key derivation
 void setSecurityTokenReference(WSSecurityTokenReference str)
          Set the SecurityTokenReference as a child of this DeriveKeyToken

 

Methods inherited from class oracle.security.xmlsec.wss.WSSElement
getId, getWsuId, setId, setWsuId

 

Methods inherited from class oracle.security.xmlsec.util.XMLElement
addNSPrefixAttr, addNSPrefixAttr, addNSPrefixAttrDefault, addNSPrefixAttrDefault, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildElementsByTagName, getChildElementsByTagName, getChildElementsByTagNameNS, getChildElementsByTagNameNS, getDefaultNSPrefix, getElement, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDefaultNSPrefix

 

Methods inherited from class oracle.security.xmlsec.util.XMLNode
appendChild, appendChild, appendTo, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSystemId, hasAttributes, hasChildNodes, insertBefore, insertBefore, isSupported, normalize, removeChild, removeChild, replaceChild, replaceChild, setNodeValue, setPrefix, setSystemId, toBytesXML, toStringXML

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Methods inherited from interface oracle.security.xmlsec.wss.WSSecurityToken
getNode

 

Field Detail

DEFAULT_LABEL

public static final java.lang.String DEFAULT_LABEL
The default label value, i.e. "WS-SecureConversationWS-SecureConversation"
See Also:
Constant Field Values

DEFAULT_LENGTH

public static final int DEFAULT_LENGTH
the default length, i.e. 32
See Also:
Constant Field Values

Constructor Detail

WSCDerivedKeyToken

protected WSCDerivedKeyToken(org.w3c.dom.Document owner,
                             java.lang.String nsURI,
                             java.lang.String localName)

WSCDerivedKeyToken

protected WSCDerivedKeyToken(org.w3c.dom.Element element,
                             java.lang.String systemId)

WSCDerivedKeyToken

protected WSCDerivedKeyToken(org.w3c.dom.Element element)

Method Detail

getToken

public java.lang.Object getToken()
                          throws WSSException
Description copied from interface: WSSecurityToken
Returns the underlying token.

Please see sub-classes for information about the Java Object returned.

Specified by:
getToken in interface WSSecurityToken
Returns:
The underlying token.
Throws:
WSSException

getTokenName

public oracle.security.xmlsec.util.QName getTokenName()
Description copied from interface: WSSecurityToken
Returns the QName of the security token.
Specified by:
getTokenName in interface WSSecurityToken
Returns:
The QName of the token.

getNsURIs

protected abstract java.lang.String[] getNsURIs()

getSecurityTokenReference

public WSSecurityTokenReference getSecurityTokenReference()
Get the SecurityTokenReference embedded inside this DerivedKeyToken
Returns:

setSecurityTokenReference

public void setSecurityTokenReference(WSSecurityTokenReference str)
Set the SecurityTokenReference as a child of this DeriveKeyToken

getLabel

public java.lang.String getLabel()
Get the label used to derive the key, if there is no label set it returns null but for key derivation it uses a default label of "WS-SecureConversationWS-SecureConversation"
Returns:

setLabel

public void setLabel(java.lang.String label)
Set the label used to set the key, call with null to remove the label
Parameters:
label -

getLength

public java.lang.Integer getLength()
Get the length used for key derivation
Returns:

setLength

public void setLength(java.lang.Integer length)
Set the length for key derivation
Parameters:
length -

getOffset

public java.lang.Integer getOffset()
Get the offset used for key derivation
Returns:

setOffset

public void setOffset(java.lang.Integer offset)
Set the offset for key derivation
Parameters:
offset -

getGeneration

public java.lang.Integer getGeneration()
Get the generation used for key derivation
Returns:

setGeneration

public void setGeneration(java.lang.Integer generation)
Set the generation for key derivation
Parameters:
generation -

getNonce

public byte[] getNonce()
Get the nonce used for key derivation
Returns:

setNonce

public void setNonce(byte[] nonce)
Set the nonce for key derivation
Parameters:
nonce -

deriveKey

public static javax.crypto.SecretKey deriveKey(javax.crypto.SecretKey secret,
                                               byte[] nonce,
                                               java.lang.String label,
                                               int offset,
                                               int length)
Use the P_SHA1 algorithm to derive a key from the given parameters
Parameters:
secret -
nonce -
label -
offset -
length -
Returns:

deriveKey

public javax.crypto.SecretKey deriveKey(javax.crypto.SecretKey secret)
Use the P_SHA1 algorithm to derive the key, but get the value of the parameters from within this token
Parameters:
secret -
Returns:

deriveKey

public javax.crypto.SecretKey deriveKey()
                                 throws WSSException
Wrapper over deriveKey(SecretKey) but gets the SecretKey by calling any registered resolvers
Returns:
Throws:
WSSException

Skip navigation links

Oracle Security Developer Tools Web Services Security Java API Reference
11g (11.1.1)

E10678-02


Copyright © 2005, 2009, Oracle. All rights reserved.