Class EncodeDecodeHelper
java.lang.Object
org.apache.synapse.commons.crypto.EncodeDecodeHelper
This class is a helper class to do encoding and decoding
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]decode(byte[] input, EncodeDecodeTypes decodingType) Decodes the provided byte array using the specified decoding type.static byte[]encode(byte[] input, EncodeDecodeTypes encodingType) Encodes the provided byte array using the specified encoding type.
-
Constructor Details
-
EncodeDecodeHelper
public EncodeDecodeHelper()
-
-
Method Details
-
encode
Encodes the provided byte array using the specified encoding type.- Parameters:
input- The byte array to encodeencodingType- The encoding to use- Returns:
- The encoded ByteArrayOutputStream as a String
- Throws:
IllegalArgumentException- if the specified decodingType is not supported
-
decode
Decodes the provided byte array using the specified decoding type.- Parameters:
input- The byte array to decodedecodingType- The decoding type to use- Returns:
- The decoded byte array
- Throws:
IllegalArgumentException- if the specified decodingType is not supported
-