public abstract class AbstractSignatureMethodImpl extends AlgorithmMethodImpl implements SignatureMethod
DOMStructure.NodeWrapperalgorithm_, params_, spec_implMap_, state_, STATE_CREATED, STATE_MARSHALED, STATE_UNINITIALIZED, STATE_UNMARSHALEDDSA_SHA1, HMAC_SHA1, RSA_SHA1| Constructor and Description |
|---|
AbstractSignatureMethodImpl(DOMCryptoContext context,
Node node)
Creates a new instance of this
AbstractSignatureMethodImpl
with the specified context and node to unmarshal from. |
AbstractSignatureMethodImpl(String algorithm,
SignatureMethodParameterSpec params)
Creates a new instance of this
AbstractSignatureMethodImpl
with the specified algorithm and params. |
| Modifier and Type | Method and Description |
|---|---|
abstract byte[] |
calculateSignatureValue(XMLCryptoContext context,
Key key,
InputStream message)
Calculates the signature value.
|
String |
getLocalName()
Returns the local name of the represented XML element.
|
String |
getNamespace()
Returns the namespace URI of the represented XML element.
|
abstract boolean |
validateSignatureValue(XMLCryptoContext context,
Key key,
byte[] value,
InputStream message)
Validates the signature.
|
containsElements, getAlgorithm, getAlgorithmInstance, getAlgorithmInstanceUncaught, getParameterSpec, getParameterSpecClass, 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, waitgetParameterSpecisFeatureSupportedgetAlgorithmpublic AbstractSignatureMethodImpl(String algorithm, SignatureMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
AbstractSignatureMethodImpl
with the specified algorithm and params.algorithm - the URI identifying the signature algorithmparams - algorithm-specific signature parameters (may be null)InvalidAlgorithmParameterException - if the specified parameters are inappropriate for the requested
algorithmNoSuchAlgorithmException - if an implementation of the specified algorithm cannot be foundNullPointerException - if algorithm is nullpublic AbstractSignatureMethodImpl(DOMCryptoContext context, Node node) throws MarshalException
AbstractSignatureMethodImpl
with the specified context and node to unmarshal from.context - the marshal contextnode - the node to unmarshal fromMarshalException - if an exception occurs during unmarshalingpublic String getLocalName()
DOMStructuregetLocalName in class DOMStructureDOMStructure.getLocalName()public String getNamespace()
DOMStructuregetNamespace in class DOMStructureDOMStructure.getNamespace()public abstract boolean validateSignatureValue(XMLCryptoContext context, Key key, byte[] value, InputStream message) throws XMLSignatureException, IOException
context - key - the key for verificationvalue - the raw signature valuemessage - the messagetrue if the signature could be validated successfully,
otherwise false.XMLSignatureException - if an unexpected exception occurs during validationIOException - if reading from message failspublic abstract byte[] calculateSignatureValue(XMLCryptoContext context, Key key, InputStream message) throws XMLSignatureException, IOException
key - the key used for singingmessage - the message to be signedXMLSignatureException - if an unexpected exception occurs during signature calculationIOException - if reading from message fails© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC