org.jcp.xml.dsig.internal.dom

Class DOMXMLSignature

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


    public final class DOMXMLSignature
    extends DOMStructure
    implements javax.xml.crypto.dsig.XMLSignature
    DOM-based implementation of XMLSignature.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      class  DOMXMLSignature.DOMSignatureValue 
      • Nested classes/interfaces inherited from interface javax.xml.crypto.dsig.XMLSignature

        javax.xml.crypto.dsig.XMLSignature.SignatureValue
    • Field Summary

      • Fields inherited from interface javax.xml.crypto.dsig.XMLSignature

        XMLNS
    • Constructor Summary

      Constructors 
      Constructor and Description
      DOMXMLSignature(org.w3c.dom.Element sigElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider)
      Creates a DOMXMLSignature from XML.
      DOMXMLSignature(javax.xml.crypto.dsig.SignedInfo si, javax.xml.crypto.dsig.keyinfo.KeyInfo ki, java.util.List<? extends javax.xml.crypto.dsig.XMLObject> objs, java.lang.String id, java.lang.String signatureValueId)
      Creates a DOMXMLSignature from the specified components.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object o) 
      java.lang.String getId() 
      javax.xml.crypto.dsig.keyinfo.KeyInfo getKeyInfo() 
      javax.xml.crypto.KeySelectorResult getKeySelectorResult() 
      java.util.List getObjects() 
      javax.xml.crypto.dsig.XMLSignature.SignatureValue getSignatureValue() 
      javax.xml.crypto.dsig.SignedInfo getSignedInfo() 
      int hashCode() 
      void marshal(org.w3c.dom.Node parent, org.w3c.dom.Node nextSibling, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context) 
      void marshal(org.w3c.dom.Node parent, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context) 
      void sign(javax.xml.crypto.dsig.XMLSignContext signContext) 
      boolean validate(javax.xml.crypto.dsig.XMLValidateContext vc) 
      • 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
    • Constructor Detail

      • DOMXMLSignature

        public DOMXMLSignature(javax.xml.crypto.dsig.SignedInfo si,
                       javax.xml.crypto.dsig.keyinfo.KeyInfo ki,
                       java.util.List<? extends javax.xml.crypto.dsig.XMLObject> objs,
                       java.lang.String id,
                       java.lang.String signatureValueId)
        Creates a DOMXMLSignature from the specified components.
        Parameters:
        si - the SignedInfo
        ki - the KeyInfo, or null if not specified
        objs - a list of XMLObjects or null if not specified. The list is copied to protect against subsequent modification.
        id - an optional id (specify null to omit)
        signatureValueId - an optional id (specify null to omit)
        Throws:
        java.lang.NullPointerException - if si is null
      • DOMXMLSignature

        public DOMXMLSignature(org.w3c.dom.Element sigElem,
                       javax.xml.crypto.XMLCryptoContext context,
                       java.security.Provider provider)
                        throws javax.xml.crypto.MarshalException
        Creates a DOMXMLSignature from XML.
        Parameters:
        sigElem - Signature element
        Throws:
        javax.xml.crypto.MarshalException - if XMLSignature cannot be unmarshalled
    • Method Detail

      • getId

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

        public javax.xml.crypto.dsig.keyinfo.KeyInfo getKeyInfo()
        Specified by:
        getKeyInfo in interface javax.xml.crypto.dsig.XMLSignature
      • getSignedInfo

        public javax.xml.crypto.dsig.SignedInfo getSignedInfo()
        Specified by:
        getSignedInfo in interface javax.xml.crypto.dsig.XMLSignature
      • getObjects

        public java.util.List getObjects()
        Specified by:
        getObjects in interface javax.xml.crypto.dsig.XMLSignature
      • getSignatureValue

        public javax.xml.crypto.dsig.XMLSignature.SignatureValue getSignatureValue()
        Specified by:
        getSignatureValue in interface javax.xml.crypto.dsig.XMLSignature
      • getKeySelectorResult

        public javax.xml.crypto.KeySelectorResult getKeySelectorResult()
        Specified by:
        getKeySelectorResult in interface javax.xml.crypto.dsig.XMLSignature
      • 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
      • marshal

        public void marshal(org.w3c.dom.Node parent,
                   org.w3c.dom.Node nextSibling,
                   java.lang.String dsPrefix,
                   javax.xml.crypto.dom.DOMCryptoContext context)
                     throws javax.xml.crypto.MarshalException
        Throws:
        javax.xml.crypto.MarshalException
      • validate

        public boolean validate(javax.xml.crypto.dsig.XMLValidateContext vc)
                         throws javax.xml.crypto.dsig.XMLSignatureException
        Specified by:
        validate in interface javax.xml.crypto.dsig.XMLSignature
        Throws:
        javax.xml.crypto.dsig.XMLSignatureException
      • sign

        public void sign(javax.xml.crypto.dsig.XMLSignContext signContext)
                  throws javax.xml.crypto.MarshalException,
                         javax.xml.crypto.dsig.XMLSignatureException
        Specified by:
        sign in interface javax.xml.crypto.dsig.XMLSignature
        Throws:
        javax.xml.crypto.MarshalException
        javax.xml.crypto.dsig.XMLSignatureException
      • 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.