public void EncryptDecryptText() { string initial = "It will be encoded and decoded just the same, because you are just looking at the bytes"; byte[] encrypted = CacheEncrypter.EncryptData(CacheUtils.GetBytes(initial), "s43a2x89"); string wrongResult = CacheUtils.GetString(encrypted); Assert.AreNotEqual(initial, wrongResult); string result = CacheUtils.GetString(CacheEncrypter.DecryptData(encrypted, "s43a2x89")); Assert.AreEqual(initial, result); }