using System.Security.Cryptography;
public static string DecryptString(string EncryptedString, string Key)
byte[] array = Convert.FromBase64String(EncryptedString);
aes.IV = Encoding.UTF8.GetBytes("1tdyjCbY1Ix49842");
aes.Mode = CipherMode.CBC;
aes.Key = Encoding.UTF8.GetBytes(Key);
using (MemoryStream stream = new MemoryStream(array))
using (CryptoStream cryptoStream = new CryptoStream(stream, aes.CreateDecryptor(), CryptoStreamMode.Read))
byte[] array2 = new byte[checked(array.Length - 1 + 1)];
cryptoStream.Read(array2, 0, array2.Length);
return Encoding.UTF8.GetString(array2);
public static void Main()
var encryptedString = "BQO5l5Kj9MdErXx6Q6AGOw==";
var password = DecryptString(encryptedString, "c4scadek3y654321");
Console.WriteLine(password);