C# Class Common.Cryptography.AES

AES is a symmetric 256-bit encryption algorthm. Read more: http://en.wikipedia.org/wiki/Advanced_Encryption_Standard
Datei anzeigen Open project: osROSE/UnityRose Class Usage Examples

Public Methods

Method Description
AES ( ) : System
Decrypt ( byte cipherTextBytes, string password = null, string salt = null, string initialVector = null ) : string

Decrypts an AES-encrypted string.

Decrypt ( string cipherText, string password = null, string salt = null, string initialVector = null ) : string

Decrypts an AES-encrypted string.

Encrypt ( string plainText, string password = null, string salt = null, string initialVector = null ) : string

Encrypts a string with AES

EncryptToBytes ( byte plainTextBytes, string password = null, string salt = null, string initialVector = null ) : byte[]

Encrypts a string with AES

EncryptToBytes ( string plainText, string password = null, string salt = null, string initialVector = null ) : byte[]

Encrypts a string with AES

Method Details

AES() public method

public AES ( ) : System
return System

Decrypt() public method

Decrypts an AES-encrypted string.
public Decrypt ( byte cipherTextBytes, string password = null, string salt = null, string initialVector = null ) : string
cipherTextBytes byte
password string Password to decrypt with
salt string Salt to decrypt with
initialVector string Needs to be 16 ASCII characters long
return string

Decrypt() public method

Decrypts an AES-encrypted string.
public Decrypt ( string cipherText, string password = null, string salt = null, string initialVector = null ) : string
cipherText string Text to be decrypted
password string Password to decrypt with
salt string Salt to decrypt with
initialVector string Needs to be 16 ASCII characters long
return string

Encrypt() public method

Encrypts a string with AES
public Encrypt ( string plainText, string password = null, string salt = null, string initialVector = null ) : string
plainText string Text to be encrypted
password string Password to encrypt with
salt string Salt to encrypt with
initialVector string Needs to be 16 ASCII characters long
return string

EncryptToBytes() public method

Encrypts a string with AES
public EncryptToBytes ( byte plainTextBytes, string password = null, string salt = null, string initialVector = null ) : byte[]
plainTextBytes byte Bytes to be encrypted
password string Password to encrypt with
salt string Salt to encrypt with
initialVector string Needs to be 16 ASCII characters long
return byte[]

EncryptToBytes() public method

Encrypts a string with AES
public EncryptToBytes ( string plainText, string password = null, string salt = null, string initialVector = null ) : byte[]
plainText string Text to be encrypted
password string Password to encrypt with
salt string Salt to encrypt with
initialVector string Needs to be 16 ASCII characters long
return byte[]