org.jcp.xml.dsig.internal.dom

Class DOMSignedInfo

  • All Implemented Interfaces:
    javax.xml.crypto.dsig.SignedInfo, javax.xml.crypto.XMLStructure


    public final class DOMSignedInfo
    extends DOMStructure
    implements javax.xml.crypto.dsig.SignedInfo
    DOM-based implementation of SignedInfo.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int MAXIMUM_REFERENCE_COUNT
      The maximum number of references per Manifest, if secure validation is enabled.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DOMSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod cm, javax.xml.crypto.dsig.SignatureMethod sm, java.util.List<? extends javax.xml.crypto.dsig.Reference> references)
      Creates a DOMSignedInfo from the specified parameters.
      DOMSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod cm, javax.xml.crypto.dsig.SignatureMethod sm, java.util.List<? extends javax.xml.crypto.dsig.Reference> references, java.lang.String id)
      Creates a DOMSignedInfo from the specified parameters.
      DOMSignedInfo(org.w3c.dom.Element siElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider)
      Creates a DOMSignedInfo from an element.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void canonicalize(javax.xml.crypto.XMLCryptoContext context, java.io.ByteArrayOutputStream bos) 
      boolean equals(java.lang.Object o) 
      javax.xml.crypto.dsig.CanonicalizationMethod getCanonicalizationMethod() 
      java.io.InputStream getCanonicalizedData() 
      java.lang.String getId() 
      java.util.List getReferences() 
      javax.xml.crypto.dsig.SignatureMethod getSignatureMethod() 
      int hashCode() 
      void marshal(org.w3c.dom.Node parent, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context) 
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.xml.crypto.XMLStructure

        isFeatureSupported
    • Field Detail

      • MAXIMUM_REFERENCE_COUNT

        public static final int MAXIMUM_REFERENCE_COUNT
        The maximum number of references per Manifest, if secure validation is enabled.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DOMSignedInfo

        public DOMSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod cm,
                     javax.xml.crypto.dsig.SignatureMethod sm,
                     java.util.List<? extends javax.xml.crypto.dsig.Reference> references)
        Creates a DOMSignedInfo from the specified parameters. Use this constructor when the Id is not specified.
        Parameters:
        cm - the canonicalization method
        sm - the signature method
        references - the list of references. The list is copied.
        Throws:
        java.lang.NullPointerException - if cm, sm, or references is null
        java.lang.IllegalArgumentException - if references is empty
        java.lang.ClassCastException - if any of the references are not of type Reference
      • DOMSignedInfo

        public DOMSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod cm,
                     javax.xml.crypto.dsig.SignatureMethod sm,
                     java.util.List<? extends javax.xml.crypto.dsig.Reference> references,
                     java.lang.String id)
        Creates a DOMSignedInfo from the specified parameters.
        Parameters:
        cm - the canonicalization method
        sm - the signature method
        references - the list of references. The list is copied.
        id - an optional identifer that will allow this SignedInfo to be referenced by other signatures and objects
        Throws:
        java.lang.NullPointerException - if cm, sm, or references is null
        java.lang.IllegalArgumentException - if references is empty
        java.lang.ClassCastException - if any of the references are not of type Reference
      • DOMSignedInfo

        public DOMSignedInfo(org.w3c.dom.Element siElem,
                     javax.xml.crypto.XMLCryptoContext context,
                     java.security.Provider provider)
                      throws javax.xml.crypto.MarshalException
        Creates a DOMSignedInfo from an element.
        Parameters:
        siElem - a SignedInfo element
        Throws:
        javax.xml.crypto.MarshalException
    • Method Detail

      • getCanonicalizationMethod

        public javax.xml.crypto.dsig.CanonicalizationMethod getCanonicalizationMethod()
        Specified by:
        getCanonicalizationMethod in interface javax.xml.crypto.dsig.SignedInfo
      • getSignatureMethod

        public javax.xml.crypto.dsig.SignatureMethod getSignatureMethod()
        Specified by:
        getSignatureMethod in interface javax.xml.crypto.dsig.SignedInfo
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface javax.xml.crypto.dsig.SignedInfo
      • getReferences

        public java.util.List getReferences()
        Specified by:
        getReferences in interface javax.xml.crypto.dsig.SignedInfo
      • getCanonicalizedData

        public java.io.InputStream getCanonicalizedData()
        Specified by:
        getCanonicalizedData in interface javax.xml.crypto.dsig.SignedInfo
      • canonicalize

        public void canonicalize(javax.xml.crypto.XMLCryptoContext context,
                        java.io.ByteArrayOutputStream bos)
                          throws javax.xml.crypto.dsig.XMLSignatureException
        Throws:
        javax.xml.crypto.dsig.XMLSignatureException
      • marshal

        public void marshal(org.w3c.dom.Node parent,
                   java.lang.String dsPrefix,
                   javax.xml.crypto.dom.DOMCryptoContext context)
                     throws javax.xml.crypto.MarshalException
        Specified by:
        marshal in class DOMStructure
        Throws:
        javax.xml.crypto.MarshalException
      • equals

        public boolean equals(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object

© Portions Copyright 2003, 2014 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2014 Oracle and/or its affiliates. All rights reserved.