|
Oracle Security Developer Tools XML Security Java API Reference 10g (10.1.4.0.1) B28178-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.xmlsec.enc.XEncUtils
Simple API for encrypting and decrypting XML Key, Element or Element Content.
Method Summary | |
static org.w3c.dom.Element |
decryptElement(org.w3c.dom.Element encryptedData, oracle.security.crypto.core.Key key) Decrypt the given EncryptedData element of data type XML Element or XML Content, and replaces the EncryptedData element with the result. |
static XEEncryptedData |
encryptElement(org.w3c.dom.Element inputElement, boolean contentOnly, java.lang.String dataEncAlg, java.lang.String keyEncAlg, oracle.security.crypto.core.Key keyEncKey, java.lang.String keyEncKeyName, oracle.security.crypto.core.RandomBitsSource rbs) Encrypt XML data of type XML Element or XML Element Content with the given algorithm. |
static XEEncryptedData |
encryptElement(org.w3c.dom.Element inputElement, boolean contentOnly, java.lang.String dataEncAlg, oracle.security.crypto.core.SymmetricKey dataEncKey, java.lang.String dataEncKeyName) Encrypt XML data of type XML Element or XML Element Content with the given algorithm and key, where the key is identified by a key name. |
static XEEncryptedData |
encryptElement(org.w3c.dom.Element inputElement, boolean contentOnly, java.lang.String dataEncAlg, oracle.security.crypto.core.SymmetricKey dataEncKey, java.lang.String keyEncAlg, oracle.security.crypto.core.Key keyEncKey, java.lang.String keyEncKeyName) Encrypt XML data of type XML Element or XML Element Content with the given algorithm and key, where the data encryption key is encrypted with the given key encryption key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static XEEncryptedData encryptElement(org.w3c.dom.Element inputElement, boolean contentOnly, java.lang.String dataEncAlg, oracle.security.crypto.core.SymmetricKey dataEncKey, java.lang.String dataEncKeyName) throws XEException
The supported data encrytion algorithms are:
inputElement
- The input XML element to be encrypted.contentOnly
- If true
, only encrypt the content of the input element; else encrypt the whole element.dataEncAlg
- The URI identifying the data encryption algorithm.dataEncKey
- The data encryption key.dataEncKeyName
- The name identifying the data encryption key, optional.XEEncryptedData
which replaces the inputElement or its content in its owner document.XEException
- If an error occurs in encrypting the data.public static XEEncryptedData encryptElement(org.w3c.dom.Element inputElement, boolean contentOnly, java.lang.String dataEncAlg, oracle.security.crypto.core.SymmetricKey dataEncKey, java.lang.String keyEncAlg, oracle.security.crypto.core.Key keyEncKey, java.lang.String keyEncKeyName) throws XEException
The supported data encrytion algorithms are:
The supported key encrytion algorithms are:
For RSA-OAEP, the following parameters are used:
SHA-1
inputElement
- The input XML elemen to be encrypted.contentOnly
- If true
, only encrypt the content of the input element; else encrypt the whole element.dataEncAlg
- The URI identifying the data encryption algorithm.dataEncKey
- The data encryption key.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 inputElement or its content in its owner document.XEException
- If an error occurs in encrypting the data.public static XEEncryptedData encryptElement(org.w3c.dom.Element inputElement, boolean contentOnly, java.lang.String dataEncAlg, java.lang.String keyEncAlg, oracle.security.crypto.core.Key keyEncKey, java.lang.String keyEncKeyName, oracle.security.crypto.core.RandomBitsSource rbs) throws XEException
The supported data encrytion algorithms are:
The supported key encrytion algorithms are:
For RSA-OAEP, the following parameters are used:
SHA-1
inputElement
- The input XML elemen to be encrypted.contentOnly
- If true
, only encrypt the content of the input element; else encrypt the whole element.dataEncAlg
- The URI identifying the data encryption algorithm.keyEncAlg
- The URI identifying the key encryption algorithm.keyEncKey
- The key encryption key.keyEncKeyName
- The name identifying the key encryption key, optional.rbs
- A PRNG to use for generating the data encryption key, optional. If rbs
is null
, the default PRNG will be used.XEEncryptedData
which replaces the inputElement or its content in its owner document.XEException
- If an error occurs in encrypting the data.public static org.w3c.dom.Element decryptElement(org.w3c.dom.Element encryptedData, oracle.security.crypto.core.Key key) throws XEException
If the data encryption key is encrypted, the key decryption key will be obtained from the EncryptedData's KeyInfo element. This may be a recursive step, as the key-encryption key may itself be encrypted. The decryption key for the bottom EncryptedKey element (or the EncryptedData element itself if the data encryption key is not encrypted) is either provided by the user, or can be derived by the Diffe-Hellman key agreement method. In the latter case the Diffie-Hellamn private key must be provided by the user.
encryptedData
- The EncryptedData element to be decrypted.key
- Data- or key-decryption key, or a Diffie-Hellman private key.XEException
|
Oracle Security Developer Tools XML Security Java API Reference 10g (10.1.4.0.1) B28178-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |