TrainSign.Common/JsStringCommon/BaseMD5Check.cs

(完整代码) 1002B

using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Security;

namespace Common
{
    public static class BaseMD5Check
    {
        private static string Md5key = "12345678"; //密钥

        // 生成MD5加密串
        public static string CheckLakalaData(string RequestValue)
        {
            string Result = string.Empty;

            RequestValue = RequestValue + Md5key;

            //MD5加密
            Result = FormsAuthentication.HashPasswordForStoringInConfigFile(RequestValue, "md5");//MD5加密

            return Result;
        }

        // 验证
        public static bool verify(int userid, string code)
        {
            string SignMd5 = userid.ToString() + Md5key;
            SignMd5 = FormsAuthentication.HashPasswordForStoringInConfigFile(SignMd5, "md5");
            if (SignMd5 == code)
            {
                return true;
            }
            return false;
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。