Class TransformBase64Decode
- java.lang.Object
-
- org.apache.xml.security.transforms.TransformSpi
-
- org.apache.xml.security.transforms.implementations.TransformBase64Decode
-
public class TransformBase64Decode extends TransformSpi
Implements thehttp://www.w3.org/2000/09/xmldsig#base64
decoding transform.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.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
implementedTransformURI
Field implementedTransformURI-
Fields inherited from class org.apache.xml.security.transforms.TransformSpi
secureValidation
-
-
Constructor Summary
Constructors Constructor Description TransformBase64Decode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
engineGetURI()
Method engineGetURI Returns the URI representation ofTransformation algorithm
protected XMLSignatureInput
enginePerformTransform(XMLSignatureInput input, java.io.OutputStream os, Transform transformObject)
The mega method which MUST be implemented by the Transformation Algorithm.protected XMLSignatureInput
enginePerformTransform(XMLSignatureInput input, Transform transformObject)
Method enginePerformTransform(package private) void
traverseElement(org.w3c.dom.Element node, java.lang.StringBuilder sb)
-
Methods inherited from class org.apache.xml.security.transforms.TransformSpi
enginePerformTransform
-
-
-
-
Field Detail
-
implementedTransformURI
public static final java.lang.String implementedTransformURI
Field implementedTransformURI- See Also:
- Constant Field Values
-
-
Method Detail
-
engineGetURI
protected java.lang.String engineGetURI()
Method engineGetURI Returns the URI representation ofTransformation algorithm
- Specified by:
engineGetURI
in classTransformSpi
- Returns:
- the URI representation of
Transformation algorithm
-
enginePerformTransform
protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform transformObject) throws java.io.IOException, CanonicalizationException, TransformationException
Method enginePerformTransform- Overrides:
enginePerformTransform
in classTransformSpi
- Parameters:
input
-transformObject
- the Transform object- Returns:
XMLSignatureInput
as the result of transformationXMLSignatureInput
as the result of transformation- Throws:
CanonicalizationException
java.io.IOException
TransformationException
-
enginePerformTransform
protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, java.io.OutputStream os, Transform transformObject) throws java.io.IOException, CanonicalizationException, TransformationException
Description copied from class:TransformSpi
The mega method which MUST be implemented by the Transformation Algorithm.- Overrides:
enginePerformTransform
in classTransformSpi
- Parameters:
input
-XMLSignatureInput
as the input of transformationos
- where to output this transformation.transformObject
- the Transform object- Returns:
XMLSignatureInput
as the result of transformation- Throws:
java.io.IOException
CanonicalizationException
TransformationException
-
traverseElement
void traverseElement(org.w3c.dom.Element node, java.lang.StringBuilder sb)
-
-