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

.Net中的MD5加密-16位32位
来源: | 更新日期: 2005-8-1 3:46:10 | 阅读(15771)人次 | 评论(0)条 |
[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 位对此文章感兴趣的网友发表了看法 发表评论 快速查看 阅读全部
正在查询状态...

[item:name], 您好

您有 [item:emoney] 乔币和 [item:integral]

我的短信箱 ([item:mail_new] 新)

用户中心  退出登录

用户名

密 码

 

注册新用户   登录   找回密码

年份检索