|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ws.security.message.WSSecBase
org.apache.ws.security.message.WSSecDerivedKeyBase
Base class for DerivedKey encryption and signature
Field Summary | |
protected byte[] |
derivedKeyBytes
Raw bytes of the derived key |
protected DerivedKeyToken |
dkt
DerivedKeyToken of this builder |
protected java.lang.String |
dktId
wsu:Id of the wsc:DerivedKeyToken |
protected org.w3c.dom.Document |
document
|
protected org.w3c.dom.Element |
envelope
soap:Envelope element |
protected byte[] |
ephemeralKey
Session key used as the secret in key derivation |
protected org.w3c.dom.Element |
strElem
The wsse:SecurityTokenReference element to be used |
protected java.lang.String |
tokenIdentifier
The Token identifier of the token that the DerivedKeyToken
is (or to be) derived from. |
Fields inherited from class org.apache.ws.security.message.WSSecBase |
doDebug, keyIdentifierType, parts, password, user, wssConfig |
Constructor Summary | |
WSSecDerivedKeyBase()
|
Method Summary | |
protected abstract int |
getDerivedKeyLength()
The derived key will change depending on the sig/encr algorithm. |
java.lang.String |
getId()
Get the id generated during prepare() . |
java.lang.String |
getTokenIdentifier()
|
void |
prepare(org.w3c.dom.Document doc,
Crypto crypto)
Initialize a WSSec Derived key. |
void |
prependDKElementToHeader(WSSecHeader secHeader)
Prepend the DerivedKey element to the elements already in the Security header. |
void |
setExternalKey(byte[] ephemeralKey,
org.w3c.dom.Element strElem)
|
void |
setExternalKey(byte[] ephemeralKey,
java.lang.String tokenIdentifier)
|
Methods inherited from class org.apache.ws.security.message.WSSecBase |
getKeyIdentifierType, setBodyID, setKeyIdentifierType, setParts, setUserInfo, setWsConfig, setWsuId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.w3c.dom.Document document
protected byte[] ephemeralKey
protected DerivedKeyToken dkt
protected byte[] derivedKeyBytes
protected java.lang.String dktId
protected org.w3c.dom.Element envelope
protected java.lang.String tokenIdentifier
DerivedKeyToken
is (or to be) derived from.
protected org.w3c.dom.Element strElem
Constructor Detail |
public WSSecDerivedKeyBase()
Method Detail |
protected abstract int getDerivedKeyLength() throws WSSecurityException
WSSecurityException
public void setExternalKey(byte[] ephemeralKey, java.lang.String tokenIdentifier)
ephemeralKey
- The ephemeralKey to set.public void setExternalKey(byte[] ephemeralKey, org.w3c.dom.Element strElem)
ephemeralKey
- The ephemeralKey to set.public java.lang.String getTokenIdentifier()
public java.lang.String getId()
prepare()
.
Returns the the value of wsu:Id attribute of the DerivedKeyToken element.
prepare()
was not called before.public void prepare(org.w3c.dom.Document doc, Crypto crypto) throws WSSecurityException
doc
- The unsigned SOAP envelope as Document
crypto
- An instance of the Crypto API to handle keystore and
certificates
WSSecurityException
public void prependDKElementToHeader(WSSecHeader secHeader)
prepare()
. This
allows to insert the DereivedKey element at any position in the Security
header.
secHeader
- The security header that holds the Signature element.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |