Class GatewaySec
- java.lang.Object
-
- com.inductiveautomation.ignition.common.GatewaySec
-
public class GatewaySec extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description GatewaySec()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
customKeyOrDefault()
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 java.lang.String
decrypt(java.lang.String toDecrypt)
Uses the default encryption key.static java.lang.String
decrypt(java.lang.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 java.lang.String
encrypt(java.lang.String toEncrypt)
Encrypts the bytes of the given string, and returns the results using hex encoding.static java.lang.String
encrypt(java.lang.String toEncrypt, byte[] encodingKey)
-
-
-
Method Detail
-
encrypt
public static java.lang.String encrypt(java.lang.String toEncrypt) throws java.lang.Exception
Encrypts the bytes of the given string, and returns the results using hex encoding. This should be used when dealing with clients.- Throws:
java.lang.Exception
-
encrypt
public static byte[] encrypt(byte[] toEncrypt) throws java.lang.Exception
This should be used when dealing with clients.- Throws:
java.lang.Exception
-
encrypt
public static java.lang.String encrypt(java.lang.String toEncrypt, byte[] encodingKey) throws java.lang.Exception
- Throws:
java.lang.Exception
-
encrypt
public static byte[] encrypt(byte[] toEncrypt, byte[] encodingKey) throws java.lang.Exception
- Throws:
java.lang.Exception
-
decrypt
public static java.lang.String decrypt(java.lang.String toDecrypt) throws java.lang.Exception
Uses the default encryption key. This should be used when dealing with clients.- Throws:
java.lang.Exception
-
decrypt
public static byte[] decrypt(byte[] toDecrypt) throws java.lang.Exception
Uses the default encryption key. This should be used when dealing with clients.- Throws:
java.lang.Exception
-
decrypt
public static java.lang.String decrypt(java.lang.String toDecrypt, byte[] encodingKey) throws java.lang.Exception
- Throws:
java.lang.Exception
-
decrypt
public static byte[] decrypt(byte[] toDecrypt, byte[] encodingKey) throws java.lang.Exception
- Throws:
java.lang.Exception
-
customKeyOrDefault
public static byte[] customKeyOrDefault()
Returns the encoding key specified by -DencodingKey, otherwise returns the default.
-
-