public class XEEncryptionMethod extends XSAlgorithmIdentifier
XMLURI, including:
XMLURI.alg_aes128_CBCXMLURI.alg_aes192_CBCXMLURI.alg_aes256_CBCXMLURI.alg_tripleDES_CBCXMLURI.alg_kwAES128XMLURI.alg_kwAES192XMLURI.alg_kwAES256XMLURI.alg_kwTripleDESXMLURI.alg_rsaOAEP_MGF1XMLURI.alg_rsaV15XEEncryptedObject| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
XSAlgorithmIdentifier |
getMGF()
Returns mask generation function URI.
|
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 |
setMGF(java.lang.String mgf)
Set the xenc11:MFG child element for this EncryptionMethod element
with the given message digest algorithm.
|
void |
setMGF(XSAlgorithmIdentifier mgf)
Set the xenc11:MFG child element for this EncryptionMethod element
with the given message digest algorithm.
|
void |
setOAEPParams(byte[] params)
Set the OAEPparams child element for this EncryptionMethod element
with the given bytes.
|
addParameter, addParameter, getAlgorithm, getParameters, setAlgorithmaddNSPrefixAttr, 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, setDefaultNSPrefixappendChild, 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, toStringXMLpublic XEEncryptionMethod(org.w3c.dom.Element encMethod)
throws org.w3c.dom.DOMException
XEEncryptionMethod instance with the given
EncryptionMethod element.encMethod - An EncryptionMethod element.org.w3c.dom.DOMExceptionpublic XEEncryptionMethod(org.w3c.dom.Element encMethod,
java.lang.String systemId)
throws org.w3c.dom.DOMException
XEEncryptionMethod instance with the given
EncryptionMethod element.encMethod - An EncryptionMethod element.systemId - The URI string system ID for this element.org.w3c.dom.DOMExceptionXMLNode.setSystemId(java.lang.String)public XEEncryptionMethod(org.w3c.dom.Document doc,
java.lang.String algorithm)
throws org.w3c.dom.DOMException
XEEncryptionMethod instance with the given
XML Document context and algorithm URI.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.org.w3c.dom.DOMExceptionpublic void setKeySize(int keySize)
throws org.w3c.dom.DOMException
keySize - The integer value for the key size.org.w3c.dom.DOMExceptionpublic int getKeySize()
0
if the KeySize child element is not set.public void setDigestMethod(java.lang.String digestMethod)
throws org.w3c.dom.DOMException
digestMethod - The algorithm URI for the digest algorithm to be used
in key transport with RSA-OAEP.org.w3c.dom.DOMExceptionXMLURIpublic void setDigestMethod(XSAlgorithmIdentifier digestMethod) throws org.w3c.dom.DOMException
digestMethod - The XSAlgorithmIdentifier for the digest algorithm
to be used in key transport with RSA-OAEP.org.w3c.dom.DOMExceptionpublic XSAlgorithmIdentifier getDigestMethod()
public void setOAEPParams(byte[] params)
throws org.w3c.dom.DOMException
params - The parameters for use with RSA-OAEP.org.w3c.dom.DOMExceptionpublic byte[] getOAEPParams()
null
if not specified.public void setMGF(java.lang.String mgf)
mgf - The algorithm URI for the mask generation function algorithm
to be used in key transport with RSA-OAEP.public XSAlgorithmIdentifier getMGF()
public void setMGF(XSAlgorithmIdentifier mgf)
mgf - The XSAlgorithmIdentifier for the mask generation function algorithm
to be used in key transport with RSA-OAEP.public java.lang.String getJCEAlgorithm()
throws XESchemaException,
XECipherException
XESchemaExceptionXECipherExceptionpublic java.lang.String getJCEKeyAlgorithm()
throws XESchemaException,
XECipherException
XESchemaExceptionXECipherExceptionpublic int keySize()
throws XESchemaException,
XECipherException
XESchemaExceptionXECipherException