Table of Contents

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 string

The 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 string

The 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 string

The key used for encryption (must be up to 32 normal characters (0-255) or 32-64 hex characters).

pBytes string

The 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 string

The data in plain text

pReturnMode AESencryption.ReturnMode

The type of data to return.

pKeepUnicode bool

Pass 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 string

The key (must be up to 32 normal characters (0-255) or 32-64 hex characters).

pPlainText string

The data in plain text

pReturnMode AESencryption.ReturnMode

The type of data to return.

pKeepUnicode bool

Pass 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.