Class GatewaySec

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

public class GatewaySec extends Object
  • 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)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated for removal in the next major version after 8.3
    static byte[]
    decrypt(byte[] toDecrypt, byte[] encodingKey)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated for removal in the next major version after 8.3
    static String
    decrypt(String toDecrypt)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated for removal in the next major version after 8.3
    static String
    decrypt(String toDecrypt, byte[] encodingKey)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated for removal in the next major version after 8.3
    static byte[]
    encrypt(byte[] toEncrypt)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated for removal in the next major version after 8.3
    static byte[]
    encrypt(byte[] toEncrypt, byte[] encodingKey)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated for removal in the next major version after 8.3
    static String
    encrypt(String toEncrypt)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated for removal in the next major version after 8.3
    static String
    encrypt(String toEncrypt, byte[] encodingKey)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated for removal in the next major version after 8.3

    Methods inherited from class java.lang.Object

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

    • encrypt

      @Deprecated(since="8.1.48", forRemoval=true) public static String encrypt(String toEncrypt) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated for removal in the next major version after 8.3
      Performs symmetric encryption using DESede. Uses ECB mode and PKCS5 padding. Encrypts the bytes of the given string, and returns the results using hex encoding. Uses the default encryption key. This should be used when dealing with clients.
      Parameters:
      toEncrypt - A String to encrypt. Must not be null. The byte array from UTF-8-encoding the String is encrypted.
      Returns:
      a String containing the hex-encoded encrypted data
      Throws:
      Exception - if the key is invalid, the block size is incorrect, or the padding is bad
      See Also:
    • encrypt

      @Deprecated(since="8.1.48", forRemoval=true) public static byte[] encrypt(byte[] toEncrypt) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated for removal in the next major version after 8.3
      Performs symmetric encryption using DESede. Uses ECB mode and PKCS5 padding. Uses the default encryption key. This should be used when dealing with clients.
      Parameters:
      toEncrypt - A byte array to encrypt. Must not be null
      Returns:
      a byte array containing the encrypted data
      Throws:
      Exception - if the key is invalid, the block size is incorrect, or the padding is bad
      See Also:
    • encrypt

      @Deprecated(since="8.1.48", forRemoval=true) public static String encrypt(String toEncrypt, byte[] encodingKey) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated for removal in the next major version after 8.3
      Performs symmetric encryption using DESede. Uses ECB mode and PKCS5 padding.
      Parameters:
      toEncrypt - A String to encrypt. Must not be null. The byte array from UTF-8-encoding the String is encrypted.
      encodingKey - The key to use. must be 24 bytes long
      Returns:
      a String containing the hex-encoded encrypted data
      Throws:
      Exception - if the key is invalid, the block size is incorrect, or the padding is bad
      See Also:
    • encrypt

      @Deprecated(since="8.1.48", forRemoval=true) public static byte[] encrypt(byte[] toEncrypt, byte[] encodingKey) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated for removal in the next major version after 8.3
      Performs symmetric encryption using DESede. Uses ECB mode and PKCS5 padding.
      Parameters:
      toEncrypt - A byte array to encrypt. Must not be null
      encodingKey - The key to use. must be 24 bytes long
      Returns:
      a byte array containing the encrypted data
      Throws:
      Exception - if the key is invalid, the block size is incorrect, or the padding is bad
      See Also:
    • decrypt

      @Deprecated(since="8.1.48", forRemoval=true) public static String decrypt(String toDecrypt) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated for removal in the next major version after 8.3
      Performs symmetric decryption using DESede. Uses ECB mode and PKCS5 padding. Uses the default encryption key. This should be used when dealing with clients.
      Parameters:
      toDecrypt - a String to decrypt. Must not be null. The String must be hex-encoded. The hex-decoded byte array is decrypted.
      Returns:
      a String containing the decrypted data. the String is the UTF-8 decoding of the decrypted byte array.
      Throws:
      Exception - if the key is invalid, the block size is incorrect, or the padding is bad
      See Also:
    • decrypt

      @Deprecated(since="8.1.48", forRemoval=true) public static byte[] decrypt(byte[] toDecrypt) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated for removal in the next major version after 8.3
      Performs symmetric decryption using DESede. Uses ECB mode and PKCS5 padding. Uses the default encryption key. This should be used when dealing with clients.
      Parameters:
      toDecrypt - a byte[] to decrypt. Must not be null
      Returns:
      a byte array containing the decrypted data
      Throws:
      Exception - if the key is invalid, the block size is incorrect, or the padding is bad
      See Also:
    • decrypt

      @Deprecated(since="8.1.48", forRemoval=true) public static String decrypt(String toDecrypt, byte[] encodingKey) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated for removal in the next major version after 8.3
      Performs symmetric decryption using DESede. Uses ECB mode and PKCS5 padding.
      Parameters:
      toDecrypt - a String to decrypt. Must not be null. The String must be hex-encoded. The hex-decoded byte array is decrypted.
      encodingKey - The key to use. must be 24 bytes long
      Returns:
      a String containing the decrypted data. the String is the UTF-8 decoding of the decrypted byte array.
      Throws:
      Exception - if the key is invalid, the block size is incorrect, or the padding is bad
      See Also:
    • decrypt

      @Deprecated(since="8.1.48", forRemoval=true) public static byte[] decrypt(byte[] toDecrypt, byte[] encodingKey) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deprecated for removal in the next major version after 8.3
      Performs symmetric decryption using DESede. Uses ECB mode and PKCS5 padding.
      Parameters:
      toDecrypt - a byte[] to decrypt. Must not be null
      encodingKey - The key to use. must be 24 bytes long
      Returns:
      a byte array containing the decrypted data
      Throws:
      Exception - if the key is invalid, the block size is incorrect, or the padding is bad
      See Also:
    • customKeyOrDefault

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