Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| XML Digital Signature and Encryption, 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.xml.crypto.enc.dom
Class DOMEncryptContext

    java.lang.Object
      javax.xml.crypto.dom.DOMCryptoContext
          javax.xml.crypto.enc.dom.DOMEncryptContext

All Implemented Interfaces:
  XMLEncryptContext, XMLCryptoContext

    public class DOMEncryptContext

extends DOMCryptoContext
implements XMLEncryptContext

A DOM-specific `XMLEncryptContext`.

Constructor Summary
`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
`EncryptionMethod` | `getEncryptionMethod()` Returns the EncryptionMethod for encryption if an EncryptionMethod will not be present in the EncryptedType
`javax.crypto.spec.IvParameterSpec` | `getIvParameterSpec()` Returns the IvParameterSpec to be use for block encryption if an initialization vector is needed.
`org.w3c.dom.Node` | `getNextSibling()` Returns the nextSibling node.
`org.w3c.dom.Node` | `getParent()` Returns the parent node.
`void` | `setEncryptionMethod(EncryptionMethod encMethod)` Specifies the EncryptionMethod for encryption if an EncryptionMethod will not be present in the EncryptedType
`void` | `setIvParameterSpec(javax.crypto.spec.IvParameterSpec ivSpec)` Specifies the IvParameterSpec for block encryption if an initialization vector is needed.
`void` | `setNextSibling(org.w3c.dom.Node nextSibling)` Sets the next sibling node.
`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

    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

    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

    public DOMEncryptContext(KeySelector ks,
                             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

    public DOMEncryptContext(java.security.Key key,
                             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

    public 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. 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

    public 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. 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

    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:
    `getIvParameterSpec` in interface `XMLEncryptContext`
  Returns:
    the IvParameterSpec to be used for block encryption

### setIvParameterSpec

    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:
    `setIvParameterSpec` in interface `XMLEncryptContext`
  Parameters:
    `ivSpec` - the initialization vector for block encryption

### getEncryptionMethod

    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:
    `getEncryptionMethod` in interface `XMLEncryptContext`
  Returns:
    the EncryptionMethod for encryption

### setEncryptionMethod

    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:
    `setEncryptionMethod` in interface `XMLEncryptContext`
  Parameters:
    `encMethod` - the EncryptionMethod for encryption

### setParent

    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:
    `getParent()`

### setNextSibling

    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:
    `getNextSibling()`

### getParent

    public org.w3c.dom.Node getParent()

  Returns the parent node.

  Returns:
    the parent node, or `null` if not specified
  See Also:
    `setParent(Node)`

### getNextSibling

    public org.w3c.dom.Node getNextSibling()

  Returns the nextSibling node.

  Returns:
    the nextSibling node, or `null` if not specified.
  See Also:
    `setNextSibling(Node)`

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| XML Digital Signature and Encryption, 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2004, IBM Corporation and Sun Microsystems, Inc. All rights reserved.
Please send comments to: jsr-106-comments@jcp.org