public abstract class DigestAlgAndValueType extends DOMStructure
DigestAlgAndValue type which supports
the DOM XML processing and representation mechanism.DOMStructure.NodeWrapper| Modifier and Type | Field and Description |
|---|---|
protected DigestMethodImpl |
digestMethod_
The
DigestMethod. |
protected DigestValueImpl |
digestValue_
The
DigestValue. |
implMap_, state_, STATE_CREATED, STATE_MARSHALED, STATE_UNINITIALIZED, STATE_UNMARSHALED| Modifier | Constructor and Description |
|---|---|
protected |
DigestAlgAndValueType(DigestMethodImpl digestMethod)
Creates a new instance of this
DigestAlgAndValueType with the
specified provider config and digest method. |
protected |
DigestAlgAndValueType(DigestMethodImpl digestMethod,
byte[] digestValue)
Creates a new instance of this
DigestAlgAndValueType with the
specified provider config, digest method and digest value. |
protected |
DigestAlgAndValueType(Node node)
Creates a new instance of this
DigestAlgAndValueType with the
specified provider config and node. |
| Modifier and Type | Method and Description |
|---|---|
void |
calculateAndAppendDigestValue(DOMCryptoContext context,
InputStream digestInput)
Calculated the digest value from the given digest input and marshals the
digest value.
|
byte[] |
calculateDigestValue(InputStream digestInput,
XMLCryptoContext context)
Calculates the digest value of the given digest input.
|
protected List |
getChildStructures()
Returns the list of child structures of this
DOMStructure. |
DigestMethod |
getDigestMethod()
Returns the digest method.
|
byte[] |
getDigestValue()
Returns the raw digest value.
|
protected void |
putChildStructure(DOMStructure childStructure)
Put an unmarshalled child structure.
|
String |
toString() |
addBytesToElement, addBytesToElement, clearMarshalling, clearMarshalling, getBytesFromElement, getBytesFromElementStream, getChildStructureVersion, getHere, getImplClass, getInstance, getInstance, getLocalName, getNamespace, getNode, getParentStructure, getParentStructureOf, getQualifiedName, getQualifiedName, hasNSDeclAttrInScope, isFeatureSupported, isNSDeclInScope, marshal, marshalAttributes, marshalElement, marshalIDAttribute, newIDforLookUp, putImplClass, setBackToCompatibilityPrior1_14, setNode, setParentStructure, unmarshal, unmarshalAttributes, unmarshalElement, unmarshalIDAttribute, unmarshalStructures, wrapNodeprotected DigestMethodImpl digestMethod_
DigestMethod. (may never be null)protected DigestValueImpl digestValue_
DigestValue. (may never be null)protected DigestAlgAndValueType(Node node) throws MarshalException
DigestAlgAndValueType with the
specified provider config and node.node - the node to unmarshal fromMarshalException - if an exception occurs during unmarshalingprotected DigestAlgAndValueType(DigestMethodImpl digestMethod)
DigestAlgAndValueType with the
specified provider config and digest method.digestMethod - the digest methodNullPointerException - if config or digestMethod is
nullprotected DigestAlgAndValueType(DigestMethodImpl digestMethod, byte[] digestValue)
DigestAlgAndValueType with the
specified provider config, digest method and digest value.digestMethod - the digest methoddigestValue - the digest valueNullPointerException - if config, digestMethod or
digestValue is nullpublic DigestMethod getDigestMethod()
public byte[] getDigestValue()
null if the digest value has
not been computed set or has not been computed yet.protected List getChildStructures()
DOMStructureDOMStructure.
This method is called by DOMStructure.marshal(DOMCryptoContext, Node, Node).
A subclass has to overwrite this method to return a list of
DOMStrucutres represented by this subclass.
getChildStructures in class DOMStructureDOMStructures (may be empty, but never
null)DOMStructure.getChildStructures()protected void putChildStructure(DOMStructure childStructure) throws MarshalException
DOMStructure
This method is called by
DOMStructure.unmarshalStructures(NodeList, DOMCryptoContext) for every
unmarshalled child structure.
A subclass has to overwrite this method to store the given child structure in its the corresponding field.
putChildStructure in class DOMStructurechildStructure - the unmarshalled child structureMarshalExceptionDOMStructure.putChildStructure(iaik.xml.crypto.dom.DOMStructure)public byte[] calculateDigestValue(InputStream digestInput, XMLCryptoContext context) throws XMLSignatureException, IOException
digestInput - the input for the digest computationcontext - the contextXMLSignatureExceptionIOExceptionpublic void calculateAndAppendDigestValue(DOMCryptoContext context, InputStream digestInput) throws MarshalException, XMLSignatureException, IOException
context - the contextdigestInput - the input for the digest computationMarshalExceptionXMLSignatureExceptionIOExceptionpublic String toString()
toString in class DOMStructureObject.toString()© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC