|
Oracle Security Developer Tools XML Security Java API Reference 10g Release 3 (10.1.3) B25383-01 |
|||||||||
| 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
oracle.security.xmlsec.enc.XEEncryptedKey
This class represents an XML-ENC EncryptedKey element. The following algorithms for encrypting keys for the block encryption algorithms Triple-DES, AES-128, AES-196, AES-256, are supported:
XEEncryptionMethod, XEEncryptedObject, XEEncryptedData, XEKeyInfo| Field Summary |
| Fields inherited from class oracle.security.xmlsec.util.XMLNode |
node, systemId |
| Constructor Summary | |
XEEncryptedKey(org.w3c.dom.Document doc)Create a new XEEncryptedKey instance with the given XML Document context. |
|
XEEncryptedKey(org.w3c.dom.Document doc, java.lang.String id)Create a new XEEncryptedKey instance with the given XML Document context and the id. |
|
XEEncryptedKey(org.w3c.dom.Element encKey)Create a XEEncryptedKey instance from the given EncryptedKey element. |
|
XEEncryptedKey(org.w3c.dom.Element encKey, java.lang.String systemId)Create a XEEncryptedKey instance from the given EncryptedKey element. |
|
| Method Summary | |
void |
addReference(XEReference ref)Add an XEReference instance for an EncryptedData or EncryptedKey element encrypted using the key being encrypted in this structure. |
byte[] |
decrypt(XEEncryptionMethod ceEncMethod)Decrypt the cipher value specified in the CipherData child element in this EncryptedKey element. |
byte[] |
decrypt(XEEncryptionMethod ceEncMethod, oracle.security.crypto.core.Key keyDecKey)Decrypt the cipher value specified in the CipherData child element in this EncryptedKey element, with the given decryption key. |
byte[] |
encrypt(byte[] contentKeyBytes)Encrypt the content encryption key bytes with the given key encryption key. |
byte[] |
encrypt(byte[] contentKeyBytes, oracle.security.crypto.core.Key keyEncKey)Encrypt the content encryption key bytes with the given key encryption key. |
byte[] |
encrypt(oracle.security.crypto.core.SymmetricKey contentKey)Encrypt the content encryption key with the given key encryption key. |
byte[] |
encrypt(oracle.security.crypto.core.SymmetricKey contentKey, oracle.security.crypto.core.Key keyEncKey)Encrypt the content encryption key with the given key encryption key. |
java.lang.String |
getCarriedKeyName()Return the key name identifying the key being encrypted. |
java.util.Vector |
getDataReferences()Get XEDataReference objects refer EncryptedData elements encrypted using the key being encrypted in this structure. |
oracle.security.crypto.core.SymmetricKey |
getKey(XEEncryptionMethod ceEncMethod)Get the content encryption key being encrypted in this EncryptedKey element. |
oracle.security.crypto.core.SymmetricKey |
getKey(XEEncryptionMethod ceEncMethod, oracle.security.crypto.core.Key keyDecKey)Get the content encryption key being encrypted in this EncryptedKey element. |
java.util.Vector |
getKeyReferences()Get the XEKeyReference objects for EncryptedKey elements that were encrypted using the key being encrypted in this structure. |
java.lang.String |
getRecipient()Returns the value of the Recipient attribute, which indicates the recipient of this encrypted key value. |
java.lang.String |
getType()Returns the type URI for an EncryptedKey element. |
static XEEncryptedKey |
newInstance()Creates a new XEEncryptedKey instance in a new owner document, and makes it the root element of the document. |
static XEEncryptedKey |
newInstance(org.w3c.dom.Document doc)Creates a new XEEncryptedKey instance in the given owner document, but does not append it to any element. |
static XEEncryptedKey |
newInstance(org.w3c.dom.Document doc, java.lang.String id)Creates a new XEEncryptedKey instance in the given owner document, but does not append it to any element. |
static XEEncryptedKey |
newInstance(java.lang.String id)Creates a new XEEncryptedKey instance in a new owner document, and makes it the root element of the document. |
void |
setCarriedKeyName(java.lang.String keyName)Set the CarriedKeyName child element for this EncryptedKey element. |
void |
setRecipient(java.lang.String recipient)Sets the Recipient attribute, which indicates the recipient of this encrypted key value. |
| 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 |
public XEEncryptedKey(org.w3c.dom.Element encKey)
XEEncryptedKey instance from the given EncryptedKey element.encKey - An EncryptedKey element.
public XEEncryptedKey(org.w3c.dom.Element encKey,
java.lang.String systemId)
XEEncryptedKey instance from the given EncryptedKey element.encKey - An EncryptedKey element.systemId - The URI string system ID for the XEEncryptedKey.public XEEncryptedKey(org.w3c.dom.Document doc)
XEEncryptedKey instance with the given XML Document context.doc - An XML Document to be used as the owner document of this element.
public XEEncryptedKey(org.w3c.dom.Document doc,
java.lang.String id)
XEEncryptedKey instance with the given XML Document context and the id.doc - An XML Document to be used as the owner document of this element.id - An optional Id string for this EncryptedKey element.| Method Detail |
public static XEEncryptedKey newInstance()
throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public static XEEncryptedKey newInstance(java.lang.String id)
throws org.w3c.dom.DOMException
id - An optional Id string for this EncryptedKey element.org.w3c.dom.DOMException
public static XEEncryptedKey newInstance(org.w3c.dom.Document doc)
throws org.w3c.dom.DOMException
doc - An XML Document to be used as the owner document of this EncryptedKey element.org.w3c.dom.DOMException
public static XEEncryptedKey newInstance(org.w3c.dom.Document doc,
java.lang.String id)
throws org.w3c.dom.DOMException
doc - An XML Document to be used as the owner document of this EncryptedKey element.id - An optional Id string for this EncryptedKey element.org.w3c.dom.DOMException
public void setCarriedKeyName(java.lang.String keyName)
throws org.w3c.dom.DOMException
keyName - The name identifying the key to be encrypted.org.w3c.dom.DOMExceptionpublic java.lang.String getCarriedKeyName()
null if not specified
public void setRecipient(java.lang.String recipient)
throws org.w3c.dom.DOMException
recipient - The string name of this encrypted key's recipient.org.w3c.dom.DOMExceptionpublic java.lang.String getRecipient()
null if the attribute is not set.
public void addReference(XEReference ref)
throws org.w3c.dom.DOMException
ref - An XEReference instance.org.w3c.dom.DOMExceptionpublic java.util.Vector getDataReferences()
Vector of XEDataReference objects.public java.util.Vector getKeyReferences()
Vector of XEKeyReference objects.public java.lang.String getType()
getType in interface KeyInfoDataXMLURI.obj_EncryptedKey.
public byte[] encrypt(byte[] contentKeyBytes,
oracle.security.crypto.core.Key keyEncKey)
throws XESchemaException,
XECipherException
contentKeyBytes - The key bytes of the content encryption key to be encrypted.keyEncKey - The key to be used in encrypting the content encryption key bytes.XESchemaExceptionXECipherException
public byte[] encrypt(byte[] contentKeyBytes)
throws XEException
The KeyInfo is used to locate the encryption key using the KeyRetriever facility. If no KeyInfo is present, or if the encryption key cannot be retrieved, a XECipherException is thrown. This method should NOT be used if the encryption key is identified by an EncryptedKey element.
contentKeyBytes - The key bytes of the content encryption key to be encrypted.XEException
public byte[] encrypt(oracle.security.crypto.core.SymmetricKey contentKey,
oracle.security.crypto.core.Key keyEncKey)
throws XESchemaException,
XECipherException
contentKey - The content encryption key to be encrypted.keyEncKey - The key to be used in encrypting the content encryption key.XESchemaExceptionXECipherException
public byte[] encrypt(oracle.security.crypto.core.SymmetricKey contentKey)
throws XEException
The KeyInfo is used to locate the encryption key using the KeyRetriever facility. If no KeyInfo is present, or if the encryption key cannot be retrieved, a XECipherException is thrown. This method should NOT be used if the encryption key is identified by an EncryptedKey element.
contentKey - The content encryption key to be encrypted.XEException
public byte[] decrypt(XEEncryptionMethod ceEncMethod,
oracle.security.crypto.core.Key keyDecKey)
throws XESchemaException,
XECipherException
ceEncMethod - An XEEncryptionMethod object identifying the content encryption algorithm for which the key encrypted in this structure is used.keyDecKey - The key decryption key.XESchemaExceptionXECipherException
public byte[] decrypt(XEEncryptionMethod ceEncMethod)
throws XEException
KeyRetriever facility.ceEncMethod - An XEEncryptionMethod object identifying the content encryption algorithm for which the key encrypted in this structure is used.XEException
public oracle.security.crypto.core.SymmetricKey getKey(XEEncryptionMethod ceEncMethod,
oracle.security.crypto.core.Key keyDecKey)
throws org.w3c.dom.DOMException,
XEException
ceEncMethod - An XEEncryptionMethod object identifying the content encryption algorithm for which the key encrypted in this structure is used.keyDecKey - The key used to decrypt the encrypted content key.org.w3c.dom.DOMExceptionXEException
public oracle.security.crypto.core.SymmetricKey getKey(XEEncryptionMethod ceEncMethod)
throws org.w3c.dom.DOMException,
XEException
KeyRetriever.ceEncMethod - An XEEncryptionMethod object identifying the content encryption algorithm for which the key encrypted in this structure is used.org.w3c.dom.DOMExceptionXEException
|
Oracle Security Developer Tools XML Security Java API Reference 10g Release 3 (10.1.3) B25383-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||