Class AESencryption
- Namespace
- PolarStudioGlobals
- Assembly
- PolarStudioGlobals.dll
This class is a helper for encrypting and decrypting data using EAS
public class AESencryption
- Inheritance
-
AESencryption
- Inherited Members
- Extension Methods
Constructors
AESencryption(string)
Creates the AES helper with the specified symetric key.
public AESencryption(string pKey)
Parameters
pKey
stringThe key (must be up to 32 normal characters (0-255) or 32-64 hex characters).
Methods
DecryptBytes(string)
Decrypts the specified bytes.
public string DecryptBytes(string pBytes)
Parameters
pBytes
stringThe bytes (as string) as was the result of a EncryptString action.
Returns
- string
The original string.
DecryptBytes(string, string)
Decrypts the specified bytes.
public static string DecryptBytes(string pKey, string pBytes)
Parameters
pKey
stringThe key used for encryption (must be up to 32 normal characters (0-255) or 32-64 hex characters).
pBytes
stringThe bytes (as string) as was the result of a EncryptString action.
Returns
- string
The original string.
EncryptString(string, ReturnMode, bool)
Encrypts a string.
public string EncryptString(string pPlainText, AESencryption.ReturnMode pReturnMode = ReturnMode.Binary, bool pKeepUnicode = true)
Parameters
pPlainText
stringThe data in plain text
pReturnMode
AESencryption.ReturnModeThe type of data to return.
pKeepUnicode
boolPass as true if the pPlainText is unicode text, use false if it is a binary string.
Returns
- string
The encrypted data in the specified format.
EncryptString(string, string, ReturnMode, bool)
Encrypts a string.
public static string EncryptString(string pKey, string pPlainText, AESencryption.ReturnMode pReturnMode = ReturnMode.Binary, bool pKeepUnicode = true)
Parameters
pKey
stringThe key (must be up to 32 normal characters (0-255) or 32-64 hex characters).
pPlainText
stringThe data in plain text
pReturnMode
AESencryption.ReturnModeThe type of data to return.
pKeepUnicode
boolPass as true if the pPlainText is unicode text, use false if it is a binary string.
Returns
- string
The encrypted data in the specified format.