javax.xml.crypto.enc.dom

Class DOMEncryptContext

    • Field Detail

      • parent

        private org.w3c.dom.Node parent
      • nextSibling

        private org.w3c.dom.Node nextSibling
      • ivSpec

        private javax.crypto.spec.IvParameterSpec ivSpec
    • 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
      • 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)
XML Security (JSR 105/106), 1.8

Copyright © 2015 IBM Corporation. All Rights Reserved.