Class Util

java.lang.Object
org.apache.synapse.commons.crypto.Util

public class Util extends Object
This is a util class to provide required functions.
  • Constructor Details

    • Util

      public Util()
  • Method Details

    • validatePasswords

      public static boolean validatePasswords(String identityStorePass, String identityKeyPass)

      Helper method to validate store password and key password

      Note : this method will validate whether both the private key and the identity store password is present, if it's not present the validation will fail.

      Parameters:
      identityStorePass - password of the identity store
      identityKeyPass - identify store private key password
      Returns:
      if valid true, false otherwise
    • getEncodeDecodeType

      public static EncodeDecodeTypes getEncodeDecodeType(String value, EncodeDecodeTypes defaultValue)
      Helper method to decide encode decode types.
      Parameters:
      value -
      defaultValue -
      Returns:
      type
    • append

      public static byte[] append(byte[] value, byte[] toAppend)
      Helper method to append encrypted parts to the response.
      Parameters:
      value -
      toAppend -
      Returns:
      response