其实在ASP.Net编程中,不用调用md5.asp来加密数据。在DotNet中有自带的类:System.Web.Security.HashPasswordForStoringInConfigFile() public string md5(string str,int code) if(code==32) //32位加密 return “00000000000000000000000000000000”;
{
if(code==16) //16位MD5加密(取32位加密的9~25字符)
{
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,”MD5″).ToLower().Substring(8,16) ;
}
{
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,”MD5″).ToLower();
}
}
asp.net中的md5加密_asp.net技巧
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » asp.net中的md5加密_asp.net技巧
相关推荐
- 暂无文章
