Skip navigation links

Oracle Security Developer Tools XML Security Java API Reference
11g (11.1.1)

E10680-02


oracle.security.xmlsec.enc
Class XEEncryptionMethod

java.lang.Object
  extended by oracle.security.xmlsec.util.XMLNode
      extended by oracle.security.xmlsec.util.XMLElement
          extended by oracle.security.xmlsec.dsig.XSAlgorithmIdentifier
              extended by oracle.security.xmlsec.enc.XEEncryptionMethod


public class XEEncryptionMethod
extends XSAlgorithmIdentifier

This class represents EncryptionMethod element which sets the algorithm and parameters to be used in encrypting the data or key. Standard encryption and key wrapping algorithm URI constants can be found in XMLURI, including:

See Also:
XEEncryptedObject

Field Summary

 

Fields inherited from class oracle.security.xmlsec.util.XMLNode
node, systemId

 

Constructor Summary
XEEncryptionMethod(org.w3c.dom.Document doc, java.lang.String algorithm)
          Create an XEEncryptionMethod instance with the given XML Document context and algorithm URI.
XEEncryptionMethod(org.w3c.dom.Element encMethod)
          Create an XEEncryptionMethod instance with the given EncryptionMethod element.
XEEncryptionMethod(org.w3c.dom.Element encMethod, java.lang.String systemId)
          Create an XEEncryptionMethod instance with the given EncryptionMethod element.

 

Method Summary
 XSAlgorithmIdentifier getDigestMethod()
          Returns message digest algorithm URI.
 java.lang.String getJCEAlgorithm()
           
 java.lang.String getJCEKeyAlgorithm()
           
 int getKeySize()
          Returns the key size provided in the KeySize child element.
 byte[] getOAEPParams()
          Returns the RSA-OAEP parameters.
 int keySize()
          Return the key size in bits either inherent in the algorithm URI or explicitly provided in the KeySize child element.
 void setDigestMethod(java.lang.String digestMethod)
          Set the DigestMethod child element for this EncryptionMethod element with the given message digest algorithm URI.This method should only be used for RSA-OAEP.
 void setDigestMethod(XSAlgorithmIdentifier digestMethod)
          Set the DigestMethod child element for this EncryptionMethod element with the given message digest algorithm.
 void setKeySize(int keySize)
          Sets the KeySize element with the given value.
 void setOAEPParams(byte[] params)
          Set the OAEPparams child element for this EncryptionMethod element with the given bytes.

 

Methods inherited from class oracle.security.xmlsec.dsig.XSAlgorithmIdentifier
addParameter, addParameter, getAlgorithm, getParameters, setAlgorithm

 

Methods inherited from class oracle.security.xmlsec.util.XMLElement
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

 

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

XEEncryptionMethod

public XEEncryptionMethod(org.w3c.dom.Element encMethod)
                   throws org.w3c.dom.DOMException
Create an XEEncryptionMethod instance with the given EncryptionMethod element.
Parameters:
encMethod - An EncryptionMethod element.
Throws:
org.w3c.dom.DOMException

XEEncryptionMethod

public XEEncryptionMethod(org.w3c.dom.Element encMethod,
                          java.lang.String systemId)
                   throws org.w3c.dom.DOMException
Create an XEEncryptionMethod instance with the given EncryptionMethod element.
Parameters:
encMethod - An EncryptionMethod element.
systemId - The URI string system ID for this element.
Throws:
org.w3c.dom.DOMException
Since:
2.0
See Also:
XMLNode.setSystemId(java.lang.String)

XEEncryptionMethod

public XEEncryptionMethod(org.w3c.dom.Document doc,
                          java.lang.String algorithm)
                   throws org.w3c.dom.DOMException
Create an XEEncryptionMethod instance with the given XML Document context and algorithm URI.
Parameters:
doc - An XML Document to be used as the owner document of this element.
algorithm - The algorithm URI identifying the encryption algorithm to be used in encryping data or key.
Throws:
org.w3c.dom.DOMException

Method Detail

setKeySize

public void setKeySize(int keySize)
                throws org.w3c.dom.DOMException
Sets the KeySize element with the given value. The key size must be consistent with the encryption algorithm specified by the algorithm URI.
Parameters:
keySize - The integer value for the key size.
Throws:
org.w3c.dom.DOMException

getKeySize

public int getKeySize()
Returns the key size provided in the KeySize child element.
Returns:
The integer value for the key size, or 0 if the KeySize child element is not set.

setDigestMethod

public void setDigestMethod(java.lang.String digestMethod)
                     throws org.w3c.dom.DOMException
Set the DigestMethod child element for this EncryptionMethod element with the given message digest algorithm URI.This method should only be used for RSA-OAEP.
Parameters:
digestMethod - The algorithm URI for the digest algorithm to be used in key transport with RSA-OAEP.
Throws:
org.w3c.dom.DOMException
See Also:
XMLURI

setDigestMethod

public void setDigestMethod(XSAlgorithmIdentifier digestMethod)
                     throws org.w3c.dom.DOMException
Set the DigestMethod child element for this EncryptionMethod element with the given message digest algorithm. This method should only be used for RSA-OAEP.
Parameters:
digestMethod - The XSAlgorithmIdentifier for the digest algorithm to be used in key transport with RSA-OAEP.
Throws:
org.w3c.dom.DOMException

getDigestMethod

public XSAlgorithmIdentifier getDigestMethod()
Returns message digest algorithm URI.
Returns:
The algorithm URI for the digest algorithm to be used in key transport with RSA-OAEP.

setOAEPParams

public void setOAEPParams(byte[] params)
                   throws org.w3c.dom.DOMException
Set the OAEPparams child element for this EncryptionMethod element with the given bytes. This method should only be used for RSA-OAEP.
Parameters:
params - The parameters for use with RSA-OAEP.
Throws:
org.w3c.dom.DOMException

getOAEPParams

public byte[] getOAEPParams()
Returns the RSA-OAEP parameters.
Returns:
The parameters for use with RSA-OAEP, or null if not specified.

getJCEAlgorithm

public java.lang.String getJCEAlgorithm()
                                 throws XESchemaException,
                                        XECipherException
Throws:
XESchemaException
XECipherException

getJCEKeyAlgorithm

public java.lang.String getJCEKeyAlgorithm()
                                    throws XESchemaException,
                                           XECipherException
Throws:
XESchemaException
XECipherException

keySize

public int keySize()
            throws XESchemaException,
                   XECipherException
Return the key size in bits either inherent in the algorithm URI or explicitly provided in the KeySize child element.
Throws:
XESchemaException
XECipherException

Skip navigation links

Oracle Security Developer Tools XML Security Java API Reference
11g (11.1.1)

E10680-02


Copyright © 2005, 2009, Oracle. All rights reserved.