private static readonly byte[] IV = new byte[8] { 240, 3, 45, 29, 0, 76, 173, 59 };
public string Decrypt(string encryptedData,string key)
{
encryptedData = HttpUtility.UrlDecode(encryptedData);
byte[] buf = Convert.FromBase64String(encryptedData);
TripleDESCryptoServiceProvider des = new TripleDESCryptoServiceProvider();
MD5CryptoServiceProvider MD5 = new MD5CryptoServiceProvider();
des.Key = MD5.ComputeHash(ASCIIEncoding.ASCII.GetBytes(key));
des.IV = IV;
return Encoding.ASCII.GetString(
des.CreateDecryptor().TransformFinalBlock(
buf,
0,
buf.Length
)
);
}
}
Is there any way to convert above .Net code to PHP so that i can decrypt data in PHP that's sent from .Net code?