Class Utils

java.lang.Object
oracle.security.am.asdk.Utils

public class Utils extends Object
  • Field Details

  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • getHmacShaSalt

      public static String getHmacShaSalt<wbr>(byte[] key, String data, Utils.HMACHashingAlgo algo, Logger LOGGER) throws AccessException
      Throws:
      AccessException
    • validateHmacShaSalt

      public static boolean validateHmacShaSalt<wbr>(byte[] key, String inputHash, String data, Utils.HMACHashingAlgo algo, Logger LOGGER) throws AccessException
      Below method first convert the incoming Hash to lower case because webgate use nz lib which produces hash with letter in upper case and Java API produces Hash with chars in equalsIgnoreCase will most likely be less performant than this approach lower case
      Parameters:
      key -
      inputHash -
      data -
      Returns:
      Throws:
      AccessException
    • getAgentHashKey

      public static byte[] getAgentHashKey<wbr>(String id, Logger logger, byte[] sharedSecret) throws Exception
      Generates the key for HMAC Hash for agent payload validation
      Parameters:
      id -
      Returns:
      Throws:
      Exception
    • getDecryptedSecret

      public static byte[] getDecryptedSecret<wbr>(String encryptedText, byte[] dccAgentKey, Logger logger) throws AccessException
      Throws:
      AccessException