javax.xml.crypto.enc.dom

Class DOMEncryptContext

  1. java.lang.Object
  2. extended byjavax.xml.crypto.dom.DOMCryptoContext
  3. extended byjavax.xml.crypto.enc.dom.DOMEncryptContext
All implemented interfaces:
XMLEncryptContext, XMLCryptoContext

  1. public class DOMEncryptContext
  2. extends DOMCryptoContext
  3. implements XMLEncryptContext
A DOM-specific XMLEncryptContext.

Constructor Summary

Constructor and Description
DOMEncryptContext(java.security.Key key)
Creates a DOMEncryptContext with the specified encryption key.
DOMEncryptContext(java.security.Key key,org.w3c.dom.Node parent)
Creates a DOMEncryptContext with the specified encryption key and parent node.
DOMEncryptContext(java.security.Key key,org.w3c.dom.Node parent,org.w3c.dom.Node nextSibling)
Creates a DOMEncryptContext with the specified key, parent and next sibling nodes.
DOMEncryptContext(KeySelector ks)
Creates a DOMEncryptContext with the specified encryption key selector.
DOMEncryptContext(KeySelector ks,org.w3c.dom.Node parent)
Creates a DOMEncryptContext with the specified encryption key selector and parent node.
DOMEncryptContext(KeySelector ks,org.w3c.dom.Node parent,org.w3c.dom.Node nextSibling)
Creates a DOMEncryptContext with the specified key selector, parent and next sibling nodes.

Method Summary

Modifier and Type Method and Description
  1. EncryptionMethod
getEncryptionMethod()
  1. javax.crypto.spec.IvParameterSpec
getIvParameterSpec()
  1. org.w3c.dom.Node
getNextSibling()
Returns the nextSibling node.
  1. org.w3c.dom.Node
getParent()
Returns the parent node.
  1. void
setEncryptionMethod(EncryptionMethod encMethod)
  1. void
setIvParameterSpec(javax.crypto.spec.IvParameterSpec ivSpec)
  1. void
setNextSibling(org.w3c.dom.Node nextSibling)
Sets the next sibling node.
  1. void
setParent(org.w3c.dom.Node parent)
Sets the parent node.
Methods inherited from class javax.xml.crypto.dom.DOMCryptoContext
get, getBaseURI, getDefaultNamespacePrefix, getElementById, getKeySelector, getNamespacePrefix, getProperty, getURIDereferencer, iterator, put, putNamespacePrefix, setBaseURI, setDefaultNamespacePrefix, setIdAttributeNS, setKeySelector, setProperty, setURIDereferencer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.xml.crypto.XMLCryptoContext
get, getBaseURI, getDefaultNamespacePrefix, getKeySelector, getNamespacePrefix, getProperty, getURIDereferencer, put, putNamespacePrefix, setBaseURI, setDefaultNamespacePrefix, setKeySelector, setProperty, setURIDereferencer

Constructor Detail

DOMEncryptContext

  1. public DOMEncryptContext(KeySelector ks)
Creates a DOMEncryptContext with the specified encryption key selector.
Parameters:
ks - the key selector
Throws:
java.lang.NullPointerException - if ks is null

DOMEncryptContext

  1. public DOMEncryptContext(java.security.Key key)
Creates a DOMEncryptContext with the specified encryption key.
Parameters:
key - the encryption key
Throws:
java.lang.NullPointerException - if key is null

DOMEncryptContext

  1. public DOMEncryptContext(KeySelector ks,
  2. org.w3c.dom.Node parent)
Creates a DOMEncryptContext with the specified encryption key selector and parent node. The marshalled EncryptedType will be added as the last child element of the specified parent node unless a next sibling node is specified by invoking the setNextSibling method.
Parameters:
ks - the key selector
parent - the parent node
Throws:
java.lang.NullPointerException - if ks or parent is null

DOMEncryptContext

  1. public DOMEncryptContext(java.security.Key key,
  2. org.w3c.dom.Node parent)
Creates a DOMEncryptContext with the specified encryption key and parent node. The marshalled EncryptedType will be added as the last child element of the specified parent node unless a next sibling node is specified by invoking the setNextSibling method.
Parameters:
key - the encryption key
parent - the parent node
Throws:
java.lang.NullPointerException - if key or parent is null

DOMEncryptContext

  1. public DOMEncryptContext(KeySelector ks,
  2. org.w3c.dom.Node parent,
  3. org.w3c.dom.Node nextSibling)
Creates a DOMEncryptContext with the specified key selector, parent and next sibling nodes. The marshalled EncryptedType will be inserted as a child element of the specified parent node and immediately before the specified next sibling node.
Parameters:
ks - the key selector
parent - the parent node
nextSibling - the next sibling node
Throws:
java.lang.NullPointerException - if ks, parent or nextSibling is null

DOMEncryptContext

  1. public DOMEncryptContext(java.security.Key key,
  2. org.w3c.dom.Node parent,
  3. org.w3c.dom.Node nextSibling)
Creates a DOMEncryptContext with the specified key, parent and next sibling nodes. The marshalled EncryptedType will be inserted as a child element of the specified parent node and immediately before the specified next sibling node.
Parameters:
key - the encryption key
parent - the parent node
nextSibling - the next sibling node
Throws:
java.lang.NullPointerException - if key, parent or nextSibling is null

Method Detail

getIvParameterSpec

  1. public javax.crypto.spec.IvParameterSpec getIvParameterSpec( )
Description copied from interface: XMLEncryptContext
Returns the IvParameterSpec to be use for block encryption if an initialization vector is needed.
Specified by:
Returns:
the IvParameterSpec to be used for block encryption

setIvParameterSpec

  1. public void setIvParameterSpec( javax.crypto.spec.IvParameterSpec ivSpec)
Description copied from interface: XMLEncryptContext
Specifies the IvParameterSpec for block encryption if an initialization vector is needed. It is recommended to not to reuse the IvParameterSpec for different encryption instances.
Specified by:
Parameters:
ivSpec - the initialization vector for block encryption

getEncryptionMethod

  1. public EncryptionMethod getEncryptionMethod( )
Description copied from interface: XMLEncryptContext
Returns the EncryptionMethod for encryption if an EncryptionMethod will not be present in the EncryptedType
Specified by:
Returns:
the EncryptionMethod for encryption

setEncryptionMethod

  1. public void setEncryptionMethod( EncryptionMethod encMethod)
Description copied from interface: XMLEncryptContext
Specifies the EncryptionMethod for encryption if an EncryptionMethod will not be present in the EncryptedType
Specified by:
Parameters:
encMethod - the EncryptionMethod for encryption

setParent

  1. public void setParent(org.w3c.dom.Node parent)
Sets the parent node.
Parameters:
parent - the parent node. The marshalled EncryptedType will be added as a child element of this node.
Throws:
java.lang.NullPointerException - if parent is null
See Also:

setNextSibling

  1. public void setNextSibling(org.w3c.dom.Node nextSibling)
Sets the next sibling node.
Parameters:
nextSibling - the next sibling node. The marshalled EncryptedType will be inserted immediately before this node. Specify null to remove the current setting.
See Also:

getParent

  1. public org.w3c.dom.Node getParent( )
Returns the parent node.
Returns:
the parent node, or null if not specified
See Also:

getNextSibling

  1. public org.w3c.dom.Node getNextSibling( )
Returns the nextSibling node.
Returns:
the nextSibling node, or null if not specified.
See Also: