org.jcp.xml.dsig.internal.dom
Class DOMXMLSignature
- java.lang.Object
-
- org.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.jcp.xml.dsig.internal.dom.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
-
Constructor Summary
Constructors Constructor and Description DOMXMLSignature(org.w3c.dom.Element sigElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider)
Creates aDOMXMLSignature
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 aDOMXMLSignature
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 org.jcp.xml.dsig.internal.dom.DOMStructure
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 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:
java.lang.NullPointerException
- ifsi
isnull
-
DOMXMLSignature
public DOMXMLSignature(org.w3c.dom.Element sigElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider) throws javax.xml.crypto.MarshalException
Creates aDOMXMLSignature
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 interfacejavax.xml.crypto.dsig.XMLSignature
-
getKeyInfo
public javax.xml.crypto.dsig.keyinfo.KeyInfo getKeyInfo()
- Specified by:
getKeyInfo
in interfacejavax.xml.crypto.dsig.XMLSignature
-
getSignedInfo
public javax.xml.crypto.dsig.SignedInfo getSignedInfo()
- Specified by:
getSignedInfo
in interfacejavax.xml.crypto.dsig.XMLSignature
-
getObjects
public java.util.List getObjects()
- Specified by:
getObjects
in interfacejavax.xml.crypto.dsig.XMLSignature
-
getSignatureValue
public javax.xml.crypto.dsig.XMLSignature.SignatureValue getSignatureValue()
- Specified by:
getSignatureValue
in interfacejavax.xml.crypto.dsig.XMLSignature
-
getKeySelectorResult
public javax.xml.crypto.KeySelectorResult getKeySelectorResult()
- Specified by:
getKeySelectorResult
in interfacejavax.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 classDOMStructure
- 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 interfacejavax.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 interfacejavax.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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-