public class DigestMethodImpl extends AlgorithmMethodImpl implements DigestMethod
DigestMethod element that supports the
DOM XML representation and processing mechanism.DOMStructure.NodeWrapper| Modifier and Type | Field and Description |
|---|---|
protected MessageDigest |
digest_
The MessageDigest.
|
algorithm_, params_, spec_implMap_, state_, STATE_CREATED, STATE_MARSHALED, STATE_UNINITIALIZED, STATE_UNMARSHALEDRIPEMD160, SHA1, SHA256, SHA512| Constructor and Description |
|---|
DigestMethodImpl(DOMCryptoContext context,
Node node)
Creates a new instance of this
NewTransformImpl with the
specified node to unmarshal from. |
DigestMethodImpl(String algorithm,
DigestMethodParameterSpec params)
Creates a new instance of this
NewTransformImpl. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
calculateDigestValue(InputStream message)
Calculates the digest value.
|
protected void |
getAlgorithmInstanceUncaught(XSecProvider.Purpose purpose) |
String |
getLocalName()
Returns the local name of the represented XML element.
|
String |
getNamespace()
Returns the namespace URI of the represented XML element.
|
protected Class |
getParameterSpecClass() |
containsElements, getAlgorithm, getAlgorithmInstance, getParameterSpec, getParamInstanceUncaught, marshal, marshalAttributes, unmarshalAttributes, unmarshalStructuresaddBytesToElement, addBytesToElement, clearMarshalling, clearMarshalling, getBytesFromElement, getBytesFromElementStream, getChildStructures, getChildStructureVersion, getHere, getImplClass, getInstance, getInstance, getNode, getParentStructure, getParentStructureOf, getQualifiedName, getQualifiedName, hasNSDeclAttrInScope, isFeatureSupported, isNSDeclInScope, marshalElement, marshalIDAttribute, newIDforLookUp, putChildStructure, putImplClass, setBackToCompatibilityPrior1_14, setNode, setParentStructure, toString, unmarshal, unmarshalElement, unmarshalIDAttribute, wrapNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetParameterSpecisFeatureSupportedgetAlgorithmprotected MessageDigest digest_
public DigestMethodImpl(String algorithm, DigestMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
NewTransformImpl.public DigestMethodImpl(DOMCryptoContext context, Node node) throws MarshalException
NewTransformImpl with the
specified node to unmarshal from.node - the node to unmarshal fromMarshalException - if an exception occurs during unmarshalingprotected void getAlgorithmInstanceUncaught(XSecProvider.Purpose purpose) throws NoSuchAlgorithmException
getAlgorithmInstanceUncaught in class AlgorithmMethodImplNoSuchAlgorithmExceptionpublic String getLocalName()
DOMStructuregetLocalName in class DOMStructureDOMStructure.getLocalName()public String getNamespace()
DOMStructuregetNamespace in class DOMStructureDOMStructure.getNamespace()public byte[] calculateDigestValue(InputStream message) throws IOException
message - the message to digestIOException - if reading from message failsprotected Class getParameterSpecClass()
getParameterSpecClass in class AlgorithmMethodImplClass of the concrete parameter spec to be returned by
AlgorithmMethodImpl.getParameterSpec().AlgorithmMethodImpl.getParameterSpecClass()© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC