public class EnvelopedSignatureTransformService extends TransformServiceImpl
TransformService implements the
Enveloped Signature transform (http://www.w3.org/2000/09/xmldsig#enveloped-signature) as specified by
the W3C recommendation XML-Signature
Syntax and Processing.
An enveloped signature transform T removes
the whole Signature element containing T
from the digest calculation of the Reference element
containing T. The entire string of characters used
by an XML processor to match the Signature with the XML
production element is removed. The output of the transform is
equivalent to the output that would result from replacing T
with an XPath transform containing the following XPath
parameter element:
<XPath xmlns:dsig="&dsig;">
count(ancestor-or-self::dsig:Signature |
here()/ancestor::dsig:Signature[1]) >
count(ancestor-or-self::dsig:Signature)</XPath>
The input and output requirements of this transform are identical to those of the XPath transform, but may only be applied to a node-set from its parent XML document. Note that it is not necessary to use an XPath expression evaluator to create this transform. However, this transform MUST produce output in exactly the same manner as the XPath transform parameterized by the XPath expression above.
This transform is implemented using the
SubtreeSieve.
Note: If NodeSetData is provided as input, the
Nodes returned by the Iterator must be given in document
order!
null)NodeSetData (Iterator returns DOM
Nodes in document-order)transformNode_| Constructor and Description |
|---|
EnvelopedSignatureTransformService() |
| Modifier and Type | Method and Description |
|---|---|
List |
getAlgorithmParameters()
Returns the list of algorithm parameter.
|
AlgorithmParameterSpec |
getParameterSpec()
Returns the algorithm-specific input parameters associated with this
Transform. |
protected void |
setParameterSpec(AlgorithmParameterSpec spec)
Sets the algorithm parameter for this
TransformService. |
protected void |
setParameterSpec(List params)
Sets the algorithm parameter for this
TransformService. |
Data |
transform(Data data,
XMLCryptoContext context)
Transforms the specified data using the underlying transform algorithm.
|
init, init, isFeatureSupported, marshalParams, parse, parse, transformgetAlgorithm, getInstance, getInstance, getInstance, getMechanismType, getProviderprotected void setParameterSpec(AlgorithmParameterSpec spec) throws InvalidAlgorithmParameterException
TransformServiceImplTransformService.setParameterSpec in class TransformServiceImplspec - the AlgorithmParameterSpecInvalidAlgorithmParameterException - if the supplied spec is not appropriate for this
TransformServiceTransformServiceImpl.setParameterSpec(java.security.spec.AlgorithmParameterSpec)protected void setParameterSpec(List params) throws InvalidAlgorithmParameterException
TransformServiceImplTransformService.setParameterSpec in class TransformServiceImplparams - the list of AlgorithmParameterImplsInvalidAlgorithmParameterException - if supplied params are not appropriate for this
TransformServiceTransformServiceImpl.setParameterSpec(java.util.List)public List getAlgorithmParameters()
TransformServiceImplgetAlgorithmParameters in class TransformServiceImplAlgorithmParameterImpls (may be empty but never
null)TransformServiceImpl.getAlgorithmParameters()public AlgorithmParameterSpec getParameterSpec()
javax.xml.crypto.dsig.TransformTransform.
The returned parameters can be typecast to a
TransformParameterSpec object.
AlgorithmMethod.
Returns null if this AlgorithmMethod does
not require parameters and they are not specified.AlgorithmMethod.getParameterSpec()public Data transform(Data data, XMLCryptoContext context) throws TransformException
javax.xml.crypto.dsig.Transformdata - the data to be transformedcontext - the XMLCryptoContext containing additional context (may
be null if not applicable)TransformException - if an error occurs while executing the transformTransform.transform(javax.xml.crypto.Data,
javax.xml.crypto.XMLCryptoContext)© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC