Beispiel #1
0
        public static string md5(string str, Md5Length code)
        {
            if (code == Md5Length.Sixteen)
            {
                return(FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower().Substring(8, 0x10));
            }
            return(FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower());

            //if (code == Md5Length.Sixteen)
            //{
            //    return MD5(str, "gb2312").ToLower().Substring(8, 0x10);
            //}

            //return FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower();
        }
Beispiel #2
0
        public static string md5(string str, Md5Length code)
        {
            if (code == Md5Length.Sixteen)
            {
                return FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower().Substring(8, 0x10);
            }
            return FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower();

            //if (code == Md5Length.Sixteen)
            //{
            //    return MD5(str, "gb2312").ToLower().Substring(8, 0x10);
            //}

            //return FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower();
        }