`
cbting
  • 浏览: 58096 次
  • 性别: Icon_minigender_1
  • 来自: 汕头
社区版块
存档分类
最新评论

把密码转为md5的形式

阅读更多

using System.Web.Security; 
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Write("123的MD吗是" + FormsAuthentication.HashPasswordForStoringInConfigFile("123","MD5"));
    }

        string pwd = txtpassword.Text.Trim();
        //把密码转为md5的形式
        pwd = FormsAuthentication.HashPasswordForStoringInConfigFile(pwd, "MD5");
       bool b=LoginManager.Login(name,pwd );

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics