public class Base64TransformService extends TransformServiceImpl
TransformService implements the
Base64 transform (http://www.w3.org/2000/09/xmldsig#base64) as specified by the W3C
recommendation XML-Signature
Syntax and Processing.
The normative specification for base64 decoding transforms is [MIME].
The base64 Transform element has no content. The input is
decoded by the algorithms. This transform is useful if an application needs
to sign the raw data associated with the encoded content of an
element.
This transform requires an octet stream for input. If an XPath node-set
(or sufficiently functional alternative) is given as input, then it is
converted to an octet stream by performing operations logically equivalent to
1) applying an XPath transform with expression self::text(),
then 2) taking the string-value of the node-set. Thus, if an XML element is
identified by a barename XPointer in the Reference URI, and its
content consists solely of base64 encoded character data, then this transform
automatically strips away the start and end tags of the identified element
and any of its descendant elements as well as any descendant comments and
processing instructions. The output of this transform is an octet
stream.
null)transformNode_| Constructor and Description |
|---|
Base64TransformService() |
| 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.Transform.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