/// <summary> /// Initializes the simple AES class. /// </summary> public SimpleAES() { PrivateKey key = new PrivateKey(); this.Key = key.GetKey(); this.Vector = key.GetVector(); //This is our encryption method RijndaelManaged rm = new RijndaelManaged(); //Create an encryptor and a decryptor using our encryption method, key, and vector. EncryptorTransform = rm.CreateEncryptor(this.Key, this.Vector); DecryptorTransform = rm.CreateDecryptor(this.Key, this.Vector); //Used to translate bytes to text and vice versa UTFEncoder = new System.Text.UTF8Encoding(); }