javax.xml.crypto.enc.dom
Class DOMEncryptContext
- java.lang.Object
javax.xml.crypto.dom.DOMCryptoContext
javax.xml.crypto.enc.dom.DOMEncryptContext
All implemented interfaces:
- public class DOMEncryptContext
- extends DOMCryptoContext
- implements XMLEncryptContext
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 |
|---|---|
getEncryptionMethod()
|
|
|
getIvParameterSpec()
|
|
getNextSibling()
Returns the nextSibling node.
|
|
getParent()
Returns the parent node.
|
|
setEncryptionMethod(EncryptionMethod encMethod)
|
|
setIvParameterSpec(javax.crypto.spec.IvParameterSpec ivSpec)
|
|
setNextSibling(org.w3c.dom.Node nextSibling)
Sets the next sibling node.
|
|
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)
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:
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:
getParent
- public org.w3c.dom.Node getParent( )
Returns the parent node.
getNextSibling
- public org.w3c.dom.Node getNextSibling( )
Returns the nextSibling node.
DOMEncryptContextwith the specified encryption key selector.