想要天天向上,就要懂得享受学习。图老师为大家推荐ASP_NET下使用MD5加密,精彩的内容需要你们用心的阅读。还在等什么快点来看看吧!
【 tulaoshi.com - Web开发 】
  其实在.net 有一个最简单实现MD5的方法
          summary
          /// MD5加密
          /// /summary
          /// param name="toCryString"被加密字符串/param
          /// returns加密后的字符串/returns
          public static string MD5(string toCryString)
          {
              return FormsAuthentication.HashPasswordForStoringInConfigFile(toCryString, "MD5");
          } 
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com/webkaifa/)
  方法2:
  public static string MD5(string str)
    {
     MD5 md5 = new MD5CryptoServiceProvider();
     byte[] result = md5.ComputeHash(System.Text.Encoding.Default.GetBytes(str));
     string str2 = "";
     for(int i=0;iresult.Length;i++)
     {
      str2 += string.Format("{0:x}",result[i]);
     }
     return str2;
    }
  链接地址: http://dygstudio.cnblogs.com/archive/2006/07/13/449988.html
  
来源:http://www.tulaoshi.com/n/20160219/1611190.html
看过《ASP_NET下使用MD5加密》的人还看了以下文章 更多>>