public class SignatureMethodImpl extends AbstractSignatureMethodImpl implements SignatureMethod
SignatureMethod that supports the DOM
 XML representation and processing mechanism.DOMStructure.NodeWrapper| Modifier and Type | Field and Description | 
|---|---|
| protected Mac | mac_The Mac. | 
| protected Signature | signature_The Signature. | 
algorithm_, params_, spec_implMap_, state_, STATE_CREATED, STATE_MARSHALED, STATE_UNINITIALIZED, STATE_UNMARSHALEDDSA_SHA1, HMAC_SHA1, RSA_SHA1| Constructor and Description | 
|---|
| SignatureMethodImpl(DOMCryptoContext context,
                   Node node)Creates a new instance of this  SignatureMethodImplwith the
 specified context and node to unmarshal from. | 
| SignatureMethodImpl(String algorithm,
                   SignatureMethodParameterSpec params)Creates a new instance of this  SignatureMethodImplwith the
 specifiedalgorithmandparams. | 
| Modifier and Type | Method and Description | 
|---|---|
| byte[] | calculateSignatureValue(Key key,
                       InputStream message)Deprecated. 
 substituted by
              calculateSignatureValue(XMLCryptoContext, Key, InputStream) | 
| byte[] | calculateSignatureValue(XMLCryptoContext context,
                       Key key,
                       InputStream message)Calculates the signature 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() | 
| boolean | validateSignatureValue(Key key,
                      byte[] value,
                      InputStream message)Deprecated. 
 | 
| boolean | validateSignatureValue(XMLCryptoContext context,
                      Key key,
                      byte[] value,
                      InputStream message)Validates the signature. | 
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 Signature signature_
protected Mac mac_
public SignatureMethodImpl(String algorithm, SignatureMethodParameterSpec params) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException
SignatureMethodImpl 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 SignatureMethodImpl(DOMCryptoContext context, Node node) throws MarshalException
SignatureMethodImpl with the
 specified context and node to unmarshal from.context - the marshal contextnode - 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 AbstractSignatureMethodImplDOMStructure.getLocalName()public String getNamespace()
DOMStructuregetNamespace in class AbstractSignatureMethodImplDOMStructure.getNamespace()public boolean validateSignatureValue(Key key, byte[] value, InputStream message) throws XMLSignatureException, IOException
validateSignatureValue(XMLCryptoContext, Key, byte[], InputStream)public boolean validateSignatureValue(XMLCryptoContext context, Key key, byte[] value, InputStream message) throws XMLSignatureException, IOException
validateSignatureValue in class AbstractSignatureMethodImplkey - the key for verificationvalue - the raw signature valuemessage - the messagecontext - the contexttrue if the signature could be validated successfully,
         otherwise false.XMLSignatureException - if an unexpected exception occurs during validationIOException - if reading from message failspublic byte[] calculateSignatureValue(Key key, InputStream message) throws XMLSignatureException, IOException
calculateSignatureValue(XMLCryptoContext, Key, InputStream)XMLSignatureExceptionIOExceptionpublic byte[] calculateSignatureValue(XMLCryptoContext context, Key key, InputStream message) throws XMLSignatureException, IOException
calculateSignatureValue in class AbstractSignatureMethodImplkey - the key used for singingmessage - the message to be signedXMLSignatureException - if an unexpected exception occurs during signature calculationIOException - 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