2. What is BASE64
Base64 is basically is used to encode and decode your data. As we need to secure
our data, attachment, documents etc. when we send over the network. Base 64
can encode your data before sending to destination.
Mule provide Base64 encoder transformer to encrypt the data and Base 64
decoder transformer to decrypt the data.
3. Base64 Encoder Transformer
A transformer that base64 encodes a string or byte array message.
• name identifies the transformer so that other elements can reference it.
• returnClass is class of message generated by transformer.
• IgnoreBadInput many transformers only accept certain classes. Such
transformers are never called with inappropriate input (whatever the value of
this attribute).
• encoding is string encoding used for transformer output.
• mimeType if can be text/plain or plain/text.
5. Base64 Encoder Transformer (Testing)
Place the any plain file in the input folder and it will be picked up by file connector
and convert into base64. Final Base64 converted file will be saved to output folder.
Input File (.docx)
7. Base64 Decoder Transformer
A transformer that base64 decodes a message to give an array of bytes.
• name identifies the transformer so that other elements can reference it.
• returnClass is class of message generated by transformer.
• IgnoreBadInput many transformers only accept certain classes. Such
transformers are never called with inappropriate input (whatever the value of
this attribute).
• encoding is string encoding used for transformer output.
• mimeType if can be text/plain or plain/text.
9. Base64 Encoder Transformer (Testing)
Place the any base64 in the input folder and it will be picked up by file connector
and it will decrypt the file. Final decrypted file will be saved to output folder.
Decrypted File (.docx)