<span class="item bar-#key#"><em>></em><a>&nbsp;</a></span>

文章 浏览文章 .Net中的MD5加密-16位32位

.Net中的MD5加密-16位32位
来源: | 更新日期: 2005-8-1 3:46:10 | 阅读(17769)人次 | 评论(0)条 | T T
[b]c#示例[/b]public string md5(string str,int code){ if(code==16) //16位MD5加密(取32位加密的9~25字符) { return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,"MD5").ToLower().Substring(8,16) ; } ...
c#示例
public string md5(string str,int code)
{
if(code==16) //16位MD5加密(取32位加密的9~25字符)
{
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,"MD5").ToLower().Substring(8,16) ;
}
else//32位加密
{
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str,"MD5").ToLower();
}
}
所属分类: 应用编程类 - ASP.Net
作者:
 
上一篇
下一篇

已有 0 位对此文章感兴趣的网友发表了看法 发表评论 快速查看 阅读全部