In fact, in ASP.Net programming, there is no need to call md5.asp to encrypt data. There is a built-in class in DotNet: System.Web.Security.HashPasswordForStoringInConfigFile()
public string md5(string str, int code)
{
if(code==16) //16-bit MD5 encryption (take 9~25 characters of 32-bit encryption)
{
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,"MD5").ToLower().Substring(8,16);
}
if(code==32) //32-bit encryption
{
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,"MD5").ToLower();
}
return "00000000000000000000000000000000";
}