Class DOMSignedInfo
java.lang.Object
org.apache.jcp.xml.dsig.internal.dom.DOMStructure
org.apache.jcp.xml.dsig.internal.dom.DOMSignedInfo
- All Implemented Interfaces:
SignedInfo,XMLStructure
DOM-based implementation of SignedInfo.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum number of references per Manifest, if secure validation is enabled. -
Constructor Summary
ConstructorsConstructorDescriptionDOMSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List<? extends Reference> references) Creates aDOMSignedInfofrom the specified parameters.DOMSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List<? extends Reference> references, String id) Creates aDOMSignedInfofrom the specified parameters.DOMSignedInfo(Element siElem, XMLCryptoContext context, Provider provider) Creates aDOMSignedInfofrom an element. -
Method Summary
Modifier and TypeMethodDescriptionvoidcanonicalize(XMLCryptoContext context, ByteArrayOutputStream bos) booleangetId()inthashCode()voidmarshal(Node parent, String dsPrefix, DOMCryptoContext context) Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupportedMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
-
Field Details
-
MAXIMUM_REFERENCE_COUNT
public static final int MAXIMUM_REFERENCE_COUNTThe maximum number of references per Manifest, if secure validation is enabled.- See Also:
-
-
Constructor Details
-
DOMSignedInfo
public DOMSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List<? extends Reference> references) Creates aDOMSignedInfofrom the specified parameters. Use this constructor when theIdis not specified.- Parameters:
cm- the canonicalization methodsm- the signature methodreferences- the list of references. The list is copied.- Throws:
NullPointerException- ifcm,sm, orreferencesisnullIllegalArgumentException- ifreferencesis emptyClassCastException- if any of the references are not of typeReference
-
DOMSignedInfo
public DOMSignedInfo(CanonicalizationMethod cm, SignatureMethod sm, List<? extends Reference> references, String id) Creates aDOMSignedInfofrom the specified parameters.- Parameters:
cm- the canonicalization methodsm- the signature methodreferences- the list of references. The list is copied.id- an optional identifer that will allow thisSignedInfoto be referenced by other signatures and objects- Throws:
NullPointerException- ifcm,sm, orreferencesisnullIllegalArgumentException- ifreferencesis emptyClassCastException- if any of the references are not of typeReference
-
DOMSignedInfo
public DOMSignedInfo(Element siElem, XMLCryptoContext context, Provider provider) throws MarshalException Creates aDOMSignedInfofrom an element.- Parameters:
siElem- a SignedInfo element- Throws:
MarshalException
-
-
Method Details
-
getCanonicalizationMethod
- Specified by:
getCanonicalizationMethodin interfaceSignedInfo
-
getSignatureMethod
- Specified by:
getSignatureMethodin interfaceSignedInfo
-
getId
- Specified by:
getIdin interfaceSignedInfo
-
getReferences
- Specified by:
getReferencesin interfaceSignedInfo
-
getCanonicalizedData
- Specified by:
getCanonicalizedDatain interfaceSignedInfo
-
canonicalize
public void canonicalize(XMLCryptoContext context, ByteArrayOutputStream bos) throws XMLSignatureException - Throws:
XMLSignatureException
-
marshal
- Specified by:
marshalin classDOMStructure- Throws:
MarshalException
-
equals
-
getSignedInfoReferences
-
hashCode
public int hashCode()
-