here is the code for ref:
RijndaelManaged rijndaelCipher = new RijndaelManaged();
rijndaelCipher.Mode = CipherMode.ECB;
rijndaelCipher.Padding = PaddingMode.PKCS7;
string sIV = null;
sIV = "0000000000000000"; //16 Zeros.
// sIV = "0";
byte[] IVBytes = Encoding.UTF8.GetBytes(sIV);
rijndaelCipher.KeySize = 0x80;
rijndaelCipher.BlockSize = 0x80;
//Decoding
byte[] encryptedData =
Convert.FromBase64String(textToDecrypt);
byte[] pwdBytes = Encoding.UTF8.GetBytes(key);
byte[] keyBytes = new byte[0x10];
int len = pwdBytes.Length;
if (len > keyBytes.Length)
{
len = keyBytes.Length;
}
Array.Copy(pwdBytes, keyBytes, len);
rijndaelCipher.Key = keyBytes;
// rijndaelCipher.IV = keyBytes;
rijndaelCipher.IV = IVBytes;
byte[] plainText =
rijndaelCipher.CreateDecryptor().TransformFinalBlock(encryptedData, 0,
encryptedData.Length);
string sDecode =
System.Text.ASCIIEncoding.ASCII.GetString(plainText);
return sDecode;