/// <summary>
              /// 生成MD5加密字符串
              /// </summary>
              /// <param name="str"></param>
              /// <param name="code"></param>
              /// <returns></returns>
              public static string CreateMd5(string str, int code)
              {
                  string md5 = "";
                  if (code == 16)
                  {
                      md5 = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower

          ().Substring(8, 16);
                  }
                  if (code == 32)
                  {
                      md5 = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower();
                  }
                  return md5;
              }

          posted on 2010-10-18 11:22 sanmao 閱讀(338) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 秦安县| 柳林县| 邢台市| 于都县| 瓦房店市| 山东省| 平遥县| 西乌| 青岛市| 林周县| 崇信县| 博客| 滦南县| 青州市| 晋宁县| 新源县| 晋中市| 海宁市| 民县| 武鸣县| 开封县| 兴化市| 于田县| 周至县| 西昌市| 万年县| 米泉市| 中山市| 当涂县| 定州市| 高陵县| 汕头市| 宁城县| 沐川县| 大厂| 农安县| 揭西县| 镇康县| 武清区| 平阳县| 荆门市|