/// <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)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 南溪县| 辽中县| 翁源县| 婺源县| 蒲城县| 新乡县| 衡水市| 新巴尔虎左旗| 阿鲁科尔沁旗| 祁东县| 南部县| 朔州市| 修水县| 巴东县| 吉首市| 铜川市| 克拉玛依市| 云龙县| 辰溪县| 江油市| 商城县| 兰西县| 右玉县| 贡嘎县| 汶川县| 深圳市| 镇沅| 新野县| 治多县| 资兴市| 鄂伦春自治旗| 平乡县| 阳朔县| 庐江县| 且末县| 上栗县| 旌德县| 周口市| 南丹县| 简阳市| 大邑县|