public class EncryptedAttribute extends EncryptedElement
Constructor and Description |
---|
EncryptedAttribute(org.w3c.dom.Document owner)
Creates a new
EncryptedAttribute instance. |
EncryptedAttribute(org.w3c.dom.Element element)
Creates a new
EncryptedAttribute instance from the given Element node. |
EncryptedAttribute(org.w3c.dom.Element element, java.lang.String SystemId)
Creates a new
EncryptedAttribute instance from the given Element node. |
Modifier and Type | Method and Description |
---|---|
oracle.security.xmlsec.enc.XEEncryptedData |
encryptAttribute(Attribute attr, java.lang.String dataEncAlg, javax.crypto.SecretKey dataEncKey, java.lang.String dataEncKeyName)
Encrypt the
Attribute with the given algorithm and content encryption key, where the key is identified by a key name. |
oracle.security.xmlsec.enc.XEEncryptedData |
encryptAttribute(Attribute attr, java.lang.String dataEncAlg, javax.crypto.SecretKey dataEncKey, java.lang.String keyEncAlg, java.security.Key keyEncKey, java.lang.String keyEncKeyName)
Encrypt the
Attribute with the given algorithm and key, where the data encryption key is encrypted with the given key encryption key. |
addEncryptedKey, decryptElement, encryptElement, encryptElement, getEncryptedData, getEncryptedKeys, removeChildren, setEncryptedData
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
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
public EncryptedAttribute(org.w3c.dom.Element element) throws org.w3c.dom.DOMException
EncryptedAttribute
instance from the given Element node.element
- A EncryptedAttribute element.org.w3c.dom.DOMException
public EncryptedAttribute(org.w3c.dom.Element element, java.lang.String SystemId) throws org.w3c.dom.DOMException
EncryptedAttribute
instance from the given Element node.element
- A EncryptedAttribute element.SystemId
- A URI representing the system ID of the EncryptedAttribute
element..org.w3c.dom.DOMException
public EncryptedAttribute(org.w3c.dom.Document owner) throws org.w3c.dom.DOMException
EncryptedAttribute
instance.owner
- The owner document of the new EncryptedAttribute.org.w3c.dom.DOMException
public oracle.security.xmlsec.enc.XEEncryptedData encryptAttribute(Attribute attr, java.lang.String dataEncAlg, javax.crypto.SecretKey dataEncKey, java.lang.String dataEncKeyName) throws oracle.security.xmlsec.enc.XEException
Attribute
with the given algorithm and content encryption key, where the key is identified by a key name.
The supported data encrytion algorithms are:
Triple DES
AES-128
AES-192
AES-256
attr
- The attribute to encrypt.dataEncAlg
- The URI identifying the data encryption algorithm.dataEncKey
- The data encryption key. If null
, a encryption key will be randomly generated.dataEncKeyName
- The name identifying the data encryption key, optional.XEEncryptedData
which replaces the element.oracle.security.xmlsec.enc.XEException
- If an error occurs in encrypting the data.public oracle.security.xmlsec.enc.XEEncryptedData encryptAttribute(Attribute attr, java.lang.String dataEncAlg, javax.crypto.SecretKey dataEncKey, java.lang.String keyEncAlg, java.security.Key keyEncKey, java.lang.String keyEncKeyName) throws oracle.security.xmlsec.enc.XEException
Attribute
with the given algorithm and key, where the data encryption key is encrypted with the given key encryption key.
The supported data encrytion algorithms are:
Triple DES
AES-128
AES-192
AES-256
The supported key encrytion algorithms are:
RSA v1.5
RSA-OAEP with MGF1
TripleDES Key Wrap
AES-128 Key Wrap
AES-192 Key Wrap
AES-256 Key Wrap
For RSA-OAEP, the following parameters are used:
SHA-1
attr
- The attribute to encrypt.dataEncAlg
- The URI identifying the data encryption algorithm.dataEncKey
- The data encryption key. If null
, a encryption key will be randomly generated.keyEncAlg
- The URI identifying the key encryption algorithm.keyEncKey
- The key encryption key.keyEncKeyName
- The name identifying the key encryption key, optional.XEEncryptedData
which replaces the element.oracle.security.xmlsec.enc.XEException
- If an error occurs in encrypting the data.