using System.Security.Cryptography;
public static void Main()
var key = "BD42BEEA3F749557534480FEE899BFC247ECFBE6B22175D5E99A32772E21C721";
var data = Convert.FromBase64String("aj8ww362WfgiBY+KMn9qBa6UB0IuP24UnAvKFKQ+wQZJXrZQedWqn2J+g3cB+Fqp1QZrDoPSuEa6ievKIr5/svvZDCjCAOUnAZxz9DSA7qUvQvbkspKXOIUjzxWKTlxdUAAAAA==");
Console.Write(Encoding.Unicode.GetString(DecryptData(data, key)));
private static byte[] DecryptData(byte[] data, string key)
byte[] numArray1 = new byte[8];
Array.Copy(data, (int)data.Length - 12, numArray1, 0, 8);
int num = BitConverter.ToInt32(data, (int)data.Length - 4);
byte[] numArray2 = new byte[num];
using (MemoryStream memoryStream = new MemoryStream(data, 0, (int)data.Length - 12))
var provider = BuildProvider(key);
using (CryptoStream cryptoStream = new CryptoStream(memoryStream, provider.CreateDecryptor(provider.Key, numArray1), CryptoStreamMode.Read))
cryptoStream.Read(numArray2, 0, num);
public static TripleDESCryptoServiceProvider BuildProvider(string key)
TripleDESCryptoServiceProvider tripleDESCryptoServiceProvider = new TripleDESCryptoServiceProvider();
int length = (int)tripleDESCryptoServiceProvider.Key.Length;
while (str.Length / 2 < length)
str = string.Concat(str, str);
tripleDESCryptoServiceProvider.Key = HexToBytes(str.Substring(0, length * 2));
return tripleDESCryptoServiceProvider;
public static byte[] HexToBytes(string hexString)
byte[] num = new byte[hexString.Length / 2];
for (int i = 0; i < (int)num.Length; i++)
num[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);