public class SPDocDigestAsInSpecificationTransformService
extends iaik.xml.crypto.alg.transform.TransformServiceImpl
SPDocDigestAsInSpecification
transform (service) as specified in ETSI EN 319 132-1:
The present document defines a new transform, which shall be identified by setting the ds:Transform's Algorithm attribute's value to:
• http://uri.etsi.org/01903/v1.3.2/SignaturePolicy/SPDocDigestAsInSpecification.
This transform shall indicate that the hash value of the signature policy document has been computed as specified in a
certain technical specification.
If this transform is used, then the SignaturePolicyIdentifier shall be qualified at least by the
SPDocSpecification qualifier, specified in clause 5.2.9.2, which identifies the aforementioned technical
specification.
NOTE 2: This transform can be used when the technical specification defines a mechanism for computing the hash value of the signature policy document that is not easily implementable using widely used XML technologies (e.g. XPath), as can occur, for instance, when the signature policy document is DER-encoded ASN.1.
This transform shall not be used in elements different than SignaturePolicyId element.
A SPDocDigestAsInSpecificationTransform
can be created as follws:
XMLSignatureFactory xmlSignatureFactory = XMLSignatureFactory.getInstance("DOM", "XSECT"); javax.xml.crypto.dsig.Transform transform = xmlSignatureFactory.newTransform(SPDocDigestAsInSpecificationTransformService.TRANSFORM_URI, null);
Modifier and Type | Field and Description |
---|---|
static String |
TRANSFORM_URI |
Constructor and Description |
---|
SPDocDigestAsInSpecificationTransformService() |
Modifier and Type | Method and Description |
---|---|
List |
getAlgorithmParameters()
Returns always an empty list.
|
AlgorithmParameterSpec |
getParameterSpec()
Always returns
null . |
protected void |
setParameterSpec(AlgorithmParameterSpec spec) |
protected void |
setParameterSpec(List params) |
Data |
transform(Data data,
XMLCryptoContext context)
Does nothing and throws a
TransformException because the actual
transformation indicated by the "http://uri.etsi.org/01903/v1.3.2/SignaturePolicy/SPDocDigestAsInSpecification"
is out of scope of XMLDSIG. |
init, init, isFeatureSupported, marshalParams, parse, parse, transform
getAlgorithm, getInstance, getInstance, getInstance, getMechanismType, getProvider
public static final String TRANSFORM_URI
public SPDocDigestAsInSpecificationTransformService()
protected void setParameterSpec(AlgorithmParameterSpec spec) throws InvalidAlgorithmParameterException
setParameterSpec
in class iaik.xml.crypto.alg.transform.TransformServiceImpl
InvalidAlgorithmParameterException
TransformServiceImpl.setParameterSpec(java.security.spec.AlgorithmParameterSpec)
protected void setParameterSpec(List params) throws InvalidAlgorithmParameterException
setParameterSpec
in class iaik.xml.crypto.alg.transform.TransformServiceImpl
InvalidAlgorithmParameterException
TransformServiceImpl.setParameterSpec(java.util.List)
public List getAlgorithmParameters()
getAlgorithmParameters
in class iaik.xml.crypto.alg.transform.TransformServiceImpl
TransformServiceImpl.getAlgorithmParameters()
public AlgorithmParameterSpec getParameterSpec()
null
.Transform.getParameterSpec()
public Data transform(Data data, XMLCryptoContext context) throws TransformException
TransformException
because the actual
transformation indicated by the "http://uri.etsi.org/01903/v1.3.2/SignaturePolicy/SPDocDigestAsInSpecification"
is out of scope of XMLDSIG.© 2002-2005 IAIK, © 2004, 2006 - 2017 Stiftung SIC