Class GatewaySec

java.lang.Object
com.inductiveautomation.ignition.common.GatewaySec

public class GatewaySec extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static byte[]
    Returns the encoding key specified by -DencodingKey, otherwise returns the default.
    static byte[]
    decrypt(byte[] toDecrypt)
    Uses the default encryption key.
    static byte[]
    decrypt(byte[] toDecrypt, byte[] encodingKey)
     
    static String
    decrypt(String toDecrypt)
    Uses the default encryption key.
    static String
    decrypt(String toDecrypt, byte[] encodingKey)
     
    static byte[]
    encrypt(byte[] toEncrypt)
    This should be used when dealing with clients.
    static byte[]
    encrypt(byte[] toEncrypt, byte[] encodingKey)
     
    static String
    encrypt(String toEncrypt)
    Encrypts the bytes of the given string, and returns the results using hex encoding.
    static String
    encrypt(String toEncrypt, byte[] encodingKey)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GatewaySec

      public GatewaySec()
  • Method Details

    • encrypt

      public static String encrypt(String toEncrypt) throws Exception
      Encrypts the bytes of the given string, and returns the results using hex encoding. This should be used when dealing with clients.
      Throws:
      Exception
    • encrypt

      public static byte[] encrypt(byte[] toEncrypt) throws Exception
      This should be used when dealing with clients.
      Throws:
      Exception
    • encrypt

      public static String encrypt(String toEncrypt, byte[] encodingKey) throws Exception
      Throws:
      Exception
    • encrypt

      public static byte[] encrypt(byte[] toEncrypt, byte[] encodingKey) throws Exception
      Throws:
      Exception
    • decrypt

      public static String decrypt(String toDecrypt) throws Exception
      Uses the default encryption key. This should be used when dealing with clients.
      Throws:
      Exception
    • decrypt

      public static byte[] decrypt(byte[] toDecrypt) throws Exception
      Uses the default encryption key. This should be used when dealing with clients.
      Throws:
      Exception
    • decrypt

      public static String decrypt(String toDecrypt, byte[] encodingKey) throws Exception
      Throws:
      Exception
    • decrypt

      public static byte[] decrypt(byte[] toDecrypt, byte[] encodingKey) throws Exception
      Throws:
      Exception
    • customKeyOrDefault

      public static byte[] customKeyOrDefault()
      Returns the encoding key specified by -DencodingKey, otherwise returns the default.