public void DecryptTest()
 {
     var target = new RijndaelCryptoProvider() { Key = Key, InitalizationVector = InitializationVector };
     var cryptoText = new byte[] { 92, 88, 212, 96, 182, 215, 173, 130, 236, 184, 241, 111, 218, 2, 147, 142 };
     var expected = "Test";
     var actual = target.Decrypt(cryptoText);
     Assert.AreEqual(expected, actual);
 }
        public static SimpleAuthenticationTicket Decrypt(string Token)
        {
            ICryptoProvider provider = new RijndaelCryptoProvider(SettingsManager.AuthenticationSettings.EncryptionKey);

            if (string.IsNullOrWhiteSpace(Token))
            {
                return null;
            }

            SimpleAuthenticationTicket ticket = provider.Decrypt<SimpleAuthenticationTicket>(Token);

            return ticket;
        }