Following code decrypts the encrypted string "thisDecode" but gives an error:
(Unhandled Exception: System.Security.Cryptography.CryptographicException: Bad Data.
at System.Security.Cryptography.CryptoAPITransform._DecryptData(IntPtr hKey,
Byte[] rgb, Int32 ib, Int32 cb, Boolean fDone)
at System.Security.Cryptography.CryptoAPITransform.TransformFinalBlock(Byte[]
inputBuffer, Int32 inputOffset, Int32 inputCount))


Code:
TripleDESCryptoServiceProvider* des;
des = new TripleDESCryptoServiceProvider();
des->GenerateKey();
des->GenerateIV();

ICryptoTransform *Decryptor;
Decryptor = des ->CreateDecryptor();
ASCIIEncoding* ascii2 = new ASCIIEncoding();
Byte DCode[] = Convert::FromBase64String(thisDecode);
String* decrypted;
decrypted = ascii2->ASCII->GetString(Decryptor->TransformFinalBlock(DCode, 0, DCode->Length),0,DCode->Length);
return decrypted;

Help needed regarding this.
Thanks.