asp.net

位置:IT落伍者 >> asp.net >> 浏览文章

用ASP.Net中的自带类进行MD5加密


发布日期:2020年02月01日
 
用ASP.Net中的自带类进行MD5加密
其实在ASPNet编程中不用调用mdasp来加密数据在DotNet中有自带的类SystemWebSecurityHashPasswordForStoringInConfigFile() 以下是引用片段

publicstringmd(stringstrintcode)

{

if(code==)//位MD加密(取位加密的~字符)

{

returnSystemWebSecurityFormsAuthenticationHashPasswordForStoringInConfigFile(strMD)ToLower()Substring();

}

if(code==)//位加密

{

returnSystemWebSecurityFormsAuthenticationHashPasswordForStoringInConfigFile(strMD)ToLower();

}

return;

}

上一篇:八天学会ASP.net(6)

下一篇:ASP.NET让网页弹出窗口不再困难