Class DOMXMLSignature
- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.BaseStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.apache.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.- Author:
- Sean Mullan, Joyce Leung
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classDOMXMLSignature.DOMSignatureValue
-
Constructor Summary
Constructors Constructor Description 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 aDOMXMLSignaturefrom the specified components.DOMXMLSignature(org.w3c.dom.Element sigElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider)Creates aDOMXMLSignaturefrom XML.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetId()javax.xml.crypto.dsig.keyinfo.KeyInfogetKeyInfo()javax.xml.crypto.KeySelectorResultgetKeySelectorResult()java.util.List<javax.xml.crypto.dsig.XMLObject>getObjects()javax.xml.crypto.dsig.XMLSignature.SignatureValuegetSignatureValue()javax.xml.crypto.dsig.SignedInfogetSignedInfo()inthashCode()voidmarshal(XmlWriter xwriter, java.lang.String dsPrefix, javax.xml.crypto.XMLCryptoContext context)voidmarshal(org.w3c.dom.Node parent, org.w3c.dom.Node nextSibling, java.lang.String dsPrefix, javax.xml.crypto.dom.DOMCryptoContext context)voidsign(javax.xml.crypto.dsig.XMLSignContext signContext)booleanvalidate(javax.xml.crypto.dsig.XMLValidateContext vc)-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.BaseStructure
isFeatureSupported, textOfNode
-
-
-
-
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 aDOMXMLSignaturefrom the specified components.- Parameters:
si- theSignedInfoki- theKeyInfo, ornullif not specifiedobjs- a list ofXMLObjects ornullif not specified. The list is copied to protect against subsequent modification.id- an optional id (specifynullto omit)signatureValueId- an optional id (specifynullto omit)- Throws:
java.lang.NullPointerException- ifsiisnull
-
DOMXMLSignature
public DOMXMLSignature(org.w3c.dom.Element sigElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider) throws javax.xml.crypto.MarshalExceptionCreates aDOMXMLSignaturefrom 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:
getIdin interfacejavax.xml.crypto.dsig.XMLSignature
-
getKeyInfo
public javax.xml.crypto.dsig.keyinfo.KeyInfo getKeyInfo()
- Specified by:
getKeyInfoin interfacejavax.xml.crypto.dsig.XMLSignature
-
getSignedInfo
public javax.xml.crypto.dsig.SignedInfo getSignedInfo()
- Specified by:
getSignedInfoin interfacejavax.xml.crypto.dsig.XMLSignature
-
getObjects
public java.util.List<javax.xml.crypto.dsig.XMLObject> getObjects()
- Specified by:
getObjectsin interfacejavax.xml.crypto.dsig.XMLSignature
-
getSignatureValue
public javax.xml.crypto.dsig.XMLSignature.SignatureValue getSignatureValue()
- Specified by:
getSignatureValuein interfacejavax.xml.crypto.dsig.XMLSignature
-
getKeySelectorResult
public javax.xml.crypto.KeySelectorResult getKeySelectorResult()
- Specified by:
getKeySelectorResultin interfacejavax.xml.crypto.dsig.XMLSignature
-
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
-
marshal
public void marshal(XmlWriter xwriter, java.lang.String dsPrefix, javax.xml.crypto.XMLCryptoContext context) throws javax.xml.crypto.MarshalException
- Specified by:
marshalin classDOMStructure- Throws:
javax.xml.crypto.MarshalException
-
validate
public boolean validate(javax.xml.crypto.dsig.XMLValidateContext vc) throws javax.xml.crypto.dsig.XMLSignatureException- Specified by:
validatein 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:
signin interfacejavax.xml.crypto.dsig.XMLSignature- Throws:
javax.xml.crypto.MarshalExceptionjavax.xml.crypto.dsig.XMLSignatureException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-