public class WSEncryptBody extends WSBaseMessage
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
embeddedKey |
protected String |
embeddedKeyName |
protected String |
encCanonAlgo |
protected javax.crypto.SecretKey |
encryptionKey
Symmetric key that's actually used.
|
protected String |
keyEncAlgo |
protected org.w3c.dom.Element |
parentNode
Parent node to which the EncryptedKeyElement should be added.
|
protected SecurityTokenReference |
securityTokenReference
SecurityTokenReference to be inserted into EncryptedData/keyInfo element.
|
protected String |
symEncAlgo |
protected javax.crypto.SecretKey |
symmetricKey
Symmetric key used in the EncrytpedKey.
|
protected X509Certificate |
useThisCert |
actor, doDebug, keyIdentifierType, mustunderstand, parts, password, timeToLive, user, wssConfig| Constructor and Description |
|---|
WSEncryptBody()
Deprecated.
replaced by
WSSecEncrypt.WSSecEncrypt() |
WSEncryptBody(String actor)
Deprecated.
replaced by
WSSecEncrypt.WSSecEncrypt()
and WSSecHeader for actor specification. |
WSEncryptBody(String actor,
boolean mu)
Deprecated.
replaced by
WSSecEncrypt.WSSecEncrypt()
and WSSecHeader for actor and mustunderstand
specification. |
| Modifier and Type | Method and Description |
|---|---|
org.w3c.dom.Document |
build(org.w3c.dom.Document doc,
Crypto crypto)
Deprecated.
|
static org.w3c.dom.Element |
createCipherValue(org.w3c.dom.Document doc,
org.w3c.dom.Element encryptedKey) |
static org.w3c.dom.Element |
createDataRefList(org.w3c.dom.Document doc,
org.w3c.dom.Element encryptedKey,
Vector encDataRefs) |
static org.w3c.dom.Element |
createEncryptedKey(org.w3c.dom.Document doc,
String keyTransportAlgo)
Create DOM subtree for
xenc:EncryptedKey |
static org.w3c.dom.Element |
createEnrcyptedKey(org.w3c.dom.Document doc,
String keyTransportAlgo)
Deprecated.
use createEncryptedKey(Document doc, String keyTransportAlgo) instead
|
javax.crypto.SecretKey |
getEncryptionKey()
Deprecated.
replaced by
WSSecEncryptedKey.getEncryptedEphemeralKey() |
SecurityTokenReference |
getSecurityTokenReference()
Deprecated.
replaced by
WSSecEncrypt.getSecurityTokenReference() |
String |
getSymmetricEncAlgorithm()
Deprecated.
replaced by
WSSecEncrypt.getSymmetricEncAlgorithm() |
javax.crypto.SecretKey |
getSymmetricKey()
Deprecated.
replaced by
WSSecEncrypt.getSymmetricKey() |
void |
setEmbeddedKeyName(String embeddedKeyName)
Deprecated.
replaced by
WSSecEncrypt.setEmbeddedKeyName(String) |
void |
setEncCanonicalization(String algo)
Deprecated.
replaced by
WSSecEncrypt.setEncCanonicalization(String) |
void |
setKey(byte[] key)
Deprecated.
replaced by
WSSecEncrypt.setKey(byte[]) |
void |
setKeyEnc(String keyEnc)
Deprecated.
replaced by
WSSecEncrypt.setKeyEnc(String) |
void |
setParentNode(org.w3c.dom.Element element)
Deprecated.
|
void |
setSecurityTokenReference(SecurityTokenReference reference)
Deprecated.
|
void |
setSymmetricEncAlgorithm(String algo)
Deprecated.
replaced by
WSSecEncrypt.setSymmetricEncAlgorithm(String) |
void |
setSymmetricKey(javax.crypto.SecretKey key)
Deprecated.
replaced by
WSSecEncrypt.setSymmetricKey(SecretKey) |
void |
setUserInfo(String user)
Deprecated.
replaced by
WSSecEncryptedKey.setUserInfo(String) |
void |
setUseThisCert(X509Certificate cert)
Deprecated.
|
getKeyIdentifierType, insertSecurityHeader, setActor, setBodyID, setKeyIdentifierType, setMustUnderstand, setParts, setTimeToLive, setUserInfo, setWsConfig, setWsuIdprotected String symEncAlgo
protected String keyEncAlgo
protected String encCanonAlgo
protected byte[] embeddedKey
protected String embeddedKeyName
protected X509Certificate useThisCert
protected javax.crypto.SecretKey symmetricKey
protected javax.crypto.SecretKey encryptionKey
protected org.w3c.dom.Element parentNode
protected SecurityTokenReference securityTokenReference
public WSEncryptBody()
WSSecEncrypt.WSSecEncrypt()public WSEncryptBody(String actor)
actor - The actor name of the wsse:Security
headerpublic WSEncryptBody(String actor, boolean mu)
WSSecEncrypt.WSSecEncrypt()
and WSSecHeader for actor and mustunderstand
specification.actor - The actor name of the wsse:Security headermu - Set mustUnderstand to true or falsepublic void setKey(byte[] key)
WSSecEncrypt.setKey(byte[])key - to use during encryption. The key must fit the
selected symmetrical encryption algorithmpublic void setKeyEnc(String keyEnc)
WSSecEncrypt.setKeyEnc(String)WSConstants.KEYTRANSPORT_RSA15
algorithm.keyEnc - specifies the key encoding algorithm.WSConstants.KEYTRANSPORT_RSA15,
WSConstants.KEYTRANSPORT_RSAOEPpublic void setUserInfo(String user)
WSSecEncryptedKey.setUserInfo(String)user - public void setEmbeddedKeyName(String embeddedKeyName)
WSSecEncrypt.setEmbeddedKeyName(String)embeddedKeyName - public void setUseThisCert(X509Certificate cert)
WSSecEncryptedKey.setUseThisCert(X509Certificate)DirectReference then use this certificate
to get the public key for encryption.cert - is the X509 certificate to use for encryptionpublic void setSymmetricEncAlgorithm(String algo)
WSSecEncrypt.setSymmetricEncAlgorithm(String)algo - Is the name of the encryption algorithmWSConstants.TRIPLE_DES,
WSConstants.AES_128,
WSConstants.AES_192,
WSConstants.AES_256public void setEncCanonicalization(String algo)
WSSecEncrypt.setEncCanonicalization(String)algo - Is the name of the canonicalization algorithmpublic String getSymmetricEncAlgorithm()
WSSecEncrypt.getSymmetricEncAlgorithm()WSConstants.TRIPLE_DES,
WSConstants.AES_128,
WSConstants.AES_192,
WSConstants.AES_256public org.w3c.dom.Document build(org.w3c.dom.Document doc,
Crypto crypto)
throws WSSecurityException
WSSecEncrypt.build(Document, Crypto, WSSecHeader)xenc:EncryptedData
wsse:Security header block doc - the SOAP envelope as Document with
plaintext Bodycrypto - an instance of the Crypto API to handle keystore and
CertificatesDocument
WSSecurityExceptionpublic static org.w3c.dom.Element createEncryptedKey(org.w3c.dom.Document doc,
String keyTransportAlgo)
xenc:EncryptedKeydoc - the SOAP envelope parent documentkeyTransportAlgo - specifies which algorithm to use to encrypt the symmetric keyxenc:EncryptedKey elementpublic static org.w3c.dom.Element createEnrcyptedKey(org.w3c.dom.Document doc,
String keyTransportAlgo)
xenc:EncryptedKeydoc - the SOAP envelope parent documentkeyTransportAlgo - specifies which algorithm to use to encrypt the symmetric keyxenc:EncryptedKey elementpublic static org.w3c.dom.Element createCipherValue(org.w3c.dom.Document doc,
org.w3c.dom.Element encryptedKey)
public static org.w3c.dom.Element createDataRefList(org.w3c.dom.Document doc,
org.w3c.dom.Element encryptedKey,
Vector encDataRefs)
public void setParentNode(org.w3c.dom.Element element)
element - public javax.crypto.SecretKey getSymmetricKey()
WSSecEncrypt.getSymmetricKey()public void setSymmetricKey(javax.crypto.SecretKey key)
WSSecEncrypt.setSymmetricKey(SecretKey)key - public javax.crypto.SecretKey getEncryptionKey()
WSSecEncryptedKey.getEncryptedEphemeralKey()public SecurityTokenReference getSecurityTokenReference()
WSSecEncrypt.getSecurityTokenReference()public void setSecurityTokenReference(SecurityTokenReference reference)
WSSecEncrypt.setSecurityTokenReference(SecurityTokenReference)reference - Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.