|
Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10680-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.xmlsec.util.XMLNode
oracle.security.xmlsec.util.XMLElement
oracle.security.xmlsec.enc.XEEncryptedObject
public abstract class XEEncryptedObject
Abstract class representing the XML-ENC EncryptedType structure. This is the base class for the XML-ENC encrypted elements EncryptedData and EncryptedKey.
The XEEncryptedObject's EncryptionMethod specifies the encryption or key wrapping algorithm to be used. Standard algorithm URI constants can be found in XMLURI
, including:
XMLURI.alg_aes128_CBC
XMLURI.alg_aes192_CBC
XMLURI.alg_aes256_CBC
XMLURI.alg_tripleDES_CBC
XMLURI.alg_kwAES128
XMLURI.alg_kwAES192
XMLURI.alg_kwAES256
XMLURI.alg_kwTripleDES
XMLURI.alg_rsaOAEP_MGF1
XMLURI.alg_rsaV15
An optional Type URI may be used to indicate the type of the encrypted object, which should be used where possible to aid in decryption processing. Standard encrypted object type URI constants can be found in XMLURI
, including:
XMLURI.obj_Element
XMLURI.obj_Content
XEEncryptionMethod
, XEEncryptedData
, XEEncryptedKey
Field Summary |
---|
Fields inherited from class oracle.security.xmlsec.util.XMLNode |
---|
node, systemId |
Constructor Summary | |
---|---|
protected |
XEEncryptedObject(org.w3c.dom.Document doc, java.lang.String tagName) Create a new XEEncryptedObject instance from the given XML Document context and the tagName. |
protected |
XEEncryptedObject(org.w3c.dom.Element encElement) Create a new XEEncryptedObject instance from the given EncryptedData or EncryptedKey element. |
protected |
XEEncryptedObject(org.w3c.dom.Element encElement, java.lang.String systemId) Create a new XEEncryptedObject instance from the given EncryptedData or EncryptedKey element. |
Method Summary | |
---|---|
XECipherData |
createCipherData() Create a new XECipherData instance. |
XECipherData |
createCipherData(byte[] cipherValue) Create a new XECipherData instance with the given cipher value. |
XECipherReference |
createCipherReference(java.lang.String uri) Create a new XECipherReference instance with the given URI. |
XEDataReference |
createDataReference(java.lang.String uri) Create a new XEDataReference instance with the given URI. |
XEEncryptionMethod |
createEncryptionMethod(java.lang.String algURI) Create a new XEEncryptionMethod instance with given URI identifying the encryption algorithm to be used in encrypting data or key. |
XEEncryptionProperties |
createEncryptionProperties() Create a new XEEncryptionProperties instance. |
XEEncryptionProperties |
createEncryptionProperties(java.lang.String id) Create a new XEEncryptionProperties instance. |
XEEncryptionProperty |
createEncryptionProperty() Create a new XEEncryptionProperty instance. |
XEEncryptionProperty |
createEncryptionProperty(java.lang.String id) Create a new XEEncryptionProperty instance. |
XEKeyInfo |
createKeyInfo() Create a new KeyInfo instance. |
XEKeyInfo |
createKeyInfo(java.lang.String id) Create a new XEKeyInfo instance with the given Id. |
XEKeyReference |
createKeyReference(java.lang.String uri) Create a new XEKeyReference instance with the given URI. |
OriginatorKeyInfo |
createOriginatorKeyInfo() Create a new OriginatorKeyInfo instance for using in key agreement. |
RecipientKeyInfo |
createRecipientKeyInfo() Create a new RecipientKeyInfo instance for using in key agreement. |
XECipherData |
getCipherData() Return the XECipherData object for this XEEncryptedObject . |
java.lang.String |
getDataType() Get the value of the Type attribute for this EncryptedData element. |
java.security.Key |
getDecryptionKey() Get the decryption key by resolving the XEKeyInfo object. |
java.lang.String |
getEncoding() Returns the Encoding attribute value. |
java.security.Key |
getEncryptionKey() Geting the encryption key from the KeyInfo child element using the KeyRetriever facility. |
XEEncryptionMethod |
getEncryptionMethod() Return the XEEncryptionMethod XEEncryptedObject. |
XEEncryptionProperties |
getEncryptionProperties() Return the XEEncryptionProperties object for this XEEncryptedObject . |
java.lang.String |
getId() Returns the value of the Id attribute for this EncryptedData or EncryptedKey element. |
static XEEncryptedObject |
getInstance(org.w3c.dom.Element encElement) Create a new XEEncryptedObject instance from the given XML Element. |
static XEEncryptedObject |
getInstance(org.w3c.dom.Element encElement, java.lang.String systemId) Create a new XEEncryptedObject instance from the given XML Element. |
XEKeyInfo |
getKeyInfo() Return the XEKeyInfo object for this XEEncryptedObject . |
java.lang.String |
getMimeType() Returns the MimeType attribute value for this EncryptedData element. |
void |
setCipherData(XECipherData cipherData) Set the CipherData child element for this XEEncryptedObject . |
void |
setDataType(java.lang.String typeURI) Set the Type attribute for this EncryptedData element. |
void |
setEncoding(java.lang.String encoding) Set the Encoding attribute which decribe how the media data encrypted was encoded (for example, "base64"). |
void |
setEncryptionMethod(XEEncryptionMethod encMethod) Sets the EncryptionMethod object in this structure. |
void |
setEncryptionProperties(XEEncryptionProperties encProps) Set the EncryptionProperties child element for this XEEncryptedObject . |
void |
setId(java.lang.String id) Set the Id attribute for this EncryptedData or EncryptedKey element. |
void |
setKeyInfo(XEKeyInfo keyInfo) Set the ds:KeyInfo child element for this XEEncryptedObject . |
void |
setMimeType(java.lang.String mimeType) Set the MimeType attribute which decribes the media type of the data encrypted. |
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 |
Constructor Detail |
---|
protected XEEncryptedObject(org.w3c.dom.Element encElement) throws org.w3c.dom.DOMException
encElement
- An EncryptedData or EncryptedKey element.org.w3c.dom.DOMException
protected XEEncryptedObject(org.w3c.dom.Element encElement, java.lang.String systemId) throws org.w3c.dom.DOMException
encElement
- An EncryptedData or EncryptedKey element.systemId
- The URI string system ID for the XEEncryptedObject
.org.w3c.dom.DOMException
protected XEEncryptedObject(org.w3c.dom.Document doc, java.lang.String tagName) throws org.w3c.dom.DOMException
doc
- A XML Document to be used as the owner document of this element.tagName
- The local name of this XML-Enc element.org.w3c.dom.DOMException
Method Detail |
---|
public static XEEncryptedObject getInstance(org.w3c.dom.Element encElement) throws org.w3c.dom.DOMException
encElement
- An EncryptedData or EncryptedKey element.XEEncryptedObject
instancejava.lang.IllegalArgumentException
- If encElement is not a supported EncryptedObject type.org.w3c.dom.DOMException
- If an error occurs parsing the given element.public static XEEncryptedObject getInstance(org.w3c.dom.Element encElement, java.lang.String systemId) throws org.w3c.dom.DOMException
encElement
- An EncryptedData or EncryptedKey element.systemId
- The URI string system ID for the XEEncryptedObject
.XEEncryptedObject
instance.java.lang.IllegalArgumentException
- If encElement is not a supported EncryptedObject type.org.w3c.dom.DOMException
- If an error occurs parsing the given element.public void setId(java.lang.String id) throws org.w3c.dom.DOMException
id
- The Id string for this element.org.w3c.dom.DOMException
public java.lang.String getId()
null
if it is missing.public void setDataType(java.lang.String typeURI) throws org.w3c.dom.DOMException
typeURI
- The URI identifying the type of the data to be encrypted.org.w3c.dom.DOMException
public java.lang.String getDataType()
null
if it is missing.public void setMimeType(java.lang.String mimeType) throws org.w3c.dom.DOMException
mimeType
- A string with a value defined by MIME.org.w3c.dom.DOMException
public java.lang.String getMimeType()
public void setEncoding(java.lang.String encoding) throws org.w3c.dom.DOMException
encoding
- A string describing the encoding type.org.w3c.dom.DOMException
public java.lang.String getEncoding()
public XEEncryptionMethod createEncryptionMethod(java.lang.String algURI) throws org.w3c.dom.DOMException
XEEncryptionMethod
instance with given URI identifying the encryption algorithm to be used in encrypting data or key. To append this new XEEncryptionMethod
to this EncryptedData or EncryptedKey structure, use the method setEncryptionMethod(XEEncryptionMethod)
.algURI
- The URI string identifying the encryption algorithm.XEEncryptionMethod
object.org.w3c.dom.DOMException
public XEKeyInfo createKeyInfo() throws org.w3c.dom.DOMException
KeyInfo
instance. To append this new KeyInfo
to this EncryptedData or EncryptedKey structure, use the method setKeyInfo(XEKeyInfo)
.KeyInfo
object.org.w3c.dom.DOMException
public XEKeyInfo createKeyInfo(java.lang.String id) throws org.w3c.dom.DOMException
XEKeyInfo
instance with the given Id. To append this new KeyInfo
to this EncryptedData or EncryptedKey structure, use the method setKeyInfo(XEKeyInfo)
.id
- The Id attribute for this ds:KeyInfo element.XEKeyInfo
object.org.w3c.dom.DOMException
public OriginatorKeyInfo createOriginatorKeyInfo() throws org.w3c.dom.DOMException
OriginatorKeyInfo
instance for using in key agreement. To append this new OriginatorKeyInfo
to an AgreementMethod structure, use the method AgreementMethod.setOriginatorKeyInfo(OriginatorKeyInfo)
.OriginatorKeyInfo
object.org.w3c.dom.DOMException
public RecipientKeyInfo createRecipientKeyInfo() throws org.w3c.dom.DOMException
RecipientKeyInfo
instance for using in key agreement. To append this new RecipientKeyInfo
to an AgreementMethod structure, use the method AgreementMethod.setRecipientKeyInfo(RecipientKeyInfo)
.RecipientKeyInfo
object.org.w3c.dom.DOMException
public XEDataReference createDataReference(java.lang.String uri) throws org.w3c.dom.DOMException
XEDataReference
instance with the given URI. To append this new XEDataReference
to a XEEncryptedKey
structure, use the method XEEncryptedKey.addReference(XEReference)
.uri
- The URI for the XEEncryptedData element referenced.XEDataReference
object.org.w3c.dom.DOMException
public XEKeyReference createKeyReference(java.lang.String uri) throws org.w3c.dom.DOMException
XEKeyReference
instance with the given URI. To append this new XEKeyReference
to a XEEncryptedKey
structure, use the method XEEncryptedKey.addReference(XEReference)
.uri
- The URI for the XEEncryptedKey element referenced.XEKeyReference
object.org.w3c.dom.DOMException
public XECipherData createCipherData(byte[] cipherValue) throws org.w3c.dom.DOMException
XECipherData
instance with the given cipher value. Use this method only when the cipher value will be stored in an internal CipherValue child element of this CipherData element. To append this new XECipherData
to this EncryptedData or EncryptedKey structure, use the method setCipherData(XECipherData)
.cipherValue
- The bytes of the CipherValue.XECipherData
instance.org.w3c.dom.DOMException
public XECipherData createCipherData() throws org.w3c.dom.DOMException
XECipherData
instance. To append this new XECipherData
to this EncryptedData or EncryptedKey structure, use the method setCipherData(XECipherData)
.XECipherData
instance.org.w3c.dom.DOMException
public XECipherReference createCipherReference(java.lang.String uri) throws org.w3c.dom.DOMException
XECipherReference
instance with the given URI. To append this new XECipherReference
to a XECipherData
structure, use the method XECipherData.setCipherReference(XECipherReference)
.uri
- A URI identifying a source containing the cipher value.XECipherReference
instance.org.w3c.dom.DOMException
public XEEncryptionProperties createEncryptionProperties() throws org.w3c.dom.DOMException
XEEncryptionProperties
instance. To append this new XEEncryptionProperties
to this EncryptedData or EncryptedKey structure, use the method setEncryptionProperties(XEEncryptionProperties)
.XEEncryptionProperties
instance.org.w3c.dom.DOMException
public XEEncryptionProperties createEncryptionProperties(java.lang.String id) throws org.w3c.dom.DOMException
XEEncryptionProperties
instance. To append this new XEEncryptionProperties
to this EncryptedData or EncryptedKey structure, use the method setEncryptionProperties(XEEncryptionProperties)
.id
- The Id attribute for this EncryptionProperties element.XEEncryptionProperties
instance.org.w3c.dom.DOMException
public XEEncryptionProperty createEncryptionProperty() throws org.w3c.dom.DOMException
XEEncryptionProperty
instance. To add this new XEEncryptionProperty
to a XEEncryptionProperties
structure, use the method XEEncryptionProperties.addEncryptionProperty(XEEncryptionProperty)
.XEEncryptionProperty
instance.org.w3c.dom.DOMException
public XEEncryptionProperty createEncryptionProperty(java.lang.String id) throws org.w3c.dom.DOMException
XEEncryptionProperty
instance. To add this new XEEncryptionProperty
to a XEEncryptionProperties
structure, use the method XEEncryptionProperties.addEncryptionProperty(XEEncryptionProperty)
.id
- The Id attribute for this EncryptionProperty element.XEEncryptionProperty
instance.org.w3c.dom.DOMException
public void setEncryptionMethod(XEEncryptionMethod encMethod) throws org.w3c.dom.DOMException
encMethod
- An XEEncryptionMethod
instance.org.w3c.dom.DOMException
public XEEncryptionMethod getEncryptionMethod()
XEEncryptionMethod
XEEncryptedObject.XEEncryptionMethod
object.public void setKeyInfo(XEKeyInfo keyInfo) throws org.w3c.dom.DOMException
XEEncryptedObject
.keyInfo
- An XEKeyInfo
instance.org.w3c.dom.DOMException
public XEKeyInfo getKeyInfo()
XEKeyInfo
object for this XEEncryptedObject
.XEKeyInfo
object.public void setCipherData(XECipherData cipherData) throws org.w3c.dom.DOMException
CipherData
child element for this XEEncryptedObject
.cipherData
- An XECipherData
instance.org.w3c.dom.DOMException
public XECipherData getCipherData()
XECipherData
object for this XEEncryptedObject
.XECipherData
object.public void setEncryptionProperties(XEEncryptionProperties encProps) throws org.w3c.dom.DOMException
EncryptionProperties
child element for this XEEncryptedObject
.encProps
- An XEEncryptionProperties
instance.org.w3c.dom.DOMException
public XEEncryptionProperties getEncryptionProperties()
XEEncryptionProperties
object for this XEEncryptedObject
.XEEncryptionProperties
object.public java.security.Key getEncryptionKey() throws XEException
KeyRetriever
facility. If no KeyInfo or EncryptionMethod is present, or if the encryption key cannot be retrieved, a XEException
is thrown. This method should NOT be used if the encryption key is identified by an EncryptedKey element.XEEncryptedObject
.XEException
public java.security.Key getDecryptionKey() throws XEException
XEKeyInfo
object. The decryption key for the bottom of the EncryptedData\EncryptedKey chain is from the KeyRetriever
facility. If no KeyInfo or EncryptionMethod is present, or if the decryption key cannot be retrieved, a XEException
is thrown.XEEncryptedObject
.XEException
|
Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10680-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |