org.apache.synapse.commons.crypto

## Class EncodeDecodeHelper

- java.lang.Object
- - org.apache.synapse.commons.crypto.EncodeDecodeHelper

-     public class EncodeDecodeHelper
      extends Object

  This class is a helper class to do encoding and decoding

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncodeDecodeHelper()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static 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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EncodeDecodeHelper

          public EncodeDecodeHelper()

  - ### Method Detail

    - #### encode

          public static byte[] encode(byte[] input,
                                      EncodeDecodeTypes encodingType)

      Encodes the provided byte array using the specified encoding type.
      Parameters:
        `input` - The byte array to encode
        `encodingType` - The encoding to use
      Returns:
        The encoded ByteArrayOutputStream as a String
      Throws:
        `IllegalArgumentException` - if the specified decodingType is not supported

    - #### decode

          public static byte[] decode(byte[] input,
                                      EncodeDecodeTypes decodingType)

      Decodes the provided byte array using the specified decoding type.
      Parameters:
        `input` - The byte array to decode
        `decodingType` - The decoding type to use
      Returns:
        The decoded byte array
      Throws:
        `IllegalArgumentException` - if the specified decodingType is not supported

Copyright © 2005–2017 Apache Software Foundation. All rights reserved.