Class DOMXMLSignature
java.lang.Object
org.apache.jcp.xml.dsig.internal.dom.DOMStructure
org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature
- All Implemented Interfaces:
XMLSignature
,XMLStructure
DOM-based implementation of XMLSignature.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface javax.xml.crypto.dsig.XMLSignature
XMLSignature.SignatureValue
-
Field Summary
Fields inherited from interface javax.xml.crypto.dsig.XMLSignature
XMLNS
-
Constructor Summary
ConstructorsConstructorDescriptionDOMXMLSignature
(SignedInfo si, KeyInfo ki, List<? extends XMLObject> objs, String id, String signatureValueId) Creates aDOMXMLSignature
from the specified components.DOMXMLSignature
(Element sigElem, XMLCryptoContext context, Provider provider) Creates aDOMXMLSignature
from XML. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
int
hashCode()
void
marshal
(Node parent, String dsPrefix, DOMCryptoContext context) void
marshal
(Node parent, Node nextSibling, String dsPrefix, DOMCryptoContext context) void
sign
(XMLSignContext signContext) boolean
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupported
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 Details
-
DOMXMLSignature
public DOMXMLSignature(SignedInfo si, KeyInfo ki, List<? extends XMLObject> objs, String id, String signatureValueId) Creates aDOMXMLSignature
from the specified components.- Parameters:
si
- theSignedInfo
ki
- theKeyInfo
, ornull
if not specifiedobjs
- a list ofXMLObject
s ornull
if not specified. The list is copied to protect against subsequent modification.id
- an optional id (specifynull
to omit)signatureValueId
- an optional id (specifynull
to omit)- Throws:
NullPointerException
- ifsi
isnull
-
DOMXMLSignature
public DOMXMLSignature(Element sigElem, XMLCryptoContext context, Provider provider) throws MarshalException Creates aDOMXMLSignature
from XML.- Parameters:
sigElem
- Signature element- Throws:
MarshalException
- if XMLSignature cannot be unmarshalled
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceXMLSignature
-
getKeyInfo
- Specified by:
getKeyInfo
in interfaceXMLSignature
-
getSignedInfo
- Specified by:
getSignedInfo
in interfaceXMLSignature
-
getObjects
- Specified by:
getObjects
in interfaceXMLSignature
-
getSignatureValue
- Specified by:
getSignatureValue
in interfaceXMLSignature
-
getKeySelectorResult
- Specified by:
getKeySelectorResult
in interfaceXMLSignature
-
marshal
- Specified by:
marshal
in classDOMStructure
- Throws:
MarshalException
-
marshal
public void marshal(Node parent, Node nextSibling, String dsPrefix, DOMCryptoContext context) throws MarshalException - Throws:
MarshalException
-
validate
- Specified by:
validate
in interfaceXMLSignature
- Throws:
XMLSignatureException
-
sign
- Specified by:
sign
in interfaceXMLSignature
- Throws:
MarshalException
XMLSignatureException
-
equals
-
hashCode
public int hashCode()
-