少年修仙传客户端代码仓库
client_linchunjie
2018-09-04 45ea04f14118be7a9c694d82920c0625b082cc49
3226【前端】猫耳游戏数据对接文档(修改字符串转为md5)
1个文件已修改
19 ■■■■ 已修改文件
Utility/LanguageVerify.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/LanguageVerify.cs
@@ -54,7 +54,7 @@
        tables["sender_vip_level"] = vipLv.ToString();
        var ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
        tables["timestamp"] = ((long)System.Convert.ToInt64(ts.TotalSeconds)).ToString();
        tables["key"] = ToMD5(StringUtility.Contact(Sercret, tables["timestamp"]));
        tables["key"] = FileExtersion.GetStringMD5Hash(StringUtility.Contact(Sercret, tables["timestamp"]));
        HttpRequest.Instance.RequestHttpPost(VerifyPlayerNameUrl, tables, HttpRequest.defaultHttpContentType, 3,
            (bool ok, string result) =>
               {
@@ -118,7 +118,7 @@
        tables["notice"] = op_type == 2 ? string.Empty : verifyContent;
        var ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
        tables["timestamp"] = ((long)System.Convert.ToInt64(ts.TotalSeconds)).ToString();
        tables["key"] = ToMD5(StringUtility.Contact(Sercret, tables["timestamp"]));
        tables["key"] = FileExtersion.GetStringMD5Hash(StringUtility.Contact(Sercret, tables["timestamp"]));
        HttpRequest.Instance.RequestHttpPost(VerifyFairyUrl, tables, HttpRequest.defaultHttpContentType, 3,
            (bool ok, string result) =>
@@ -185,7 +185,7 @@
        var ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
        tables["timestamp"] = ((long)System.Convert.ToInt64(ts.TotalSeconds)).ToString();
        tables["key"] = ToMD5(StringUtility.Contact(Sercret, tables["timestamp"]));
        tables["key"] = FileExtersion.GetStringMD5Hash(StringUtility.Contact(Sercret, tables["timestamp"]));
        HttpRequest.Instance.RequestHttpPost(VerifyChatUrl, tables, HttpRequest.defaultHttpContentType, 3,
            (bool ok, string result) =>
@@ -250,19 +250,6 @@
        }
        return true;
    }
    static string ToMD5(string content)
    {
        byte[] bytes = Encoding.UTF8.GetBytes(content);
        MD5 md5 = new MD5CryptoServiceProvider();
        byte[] hash = md5.ComputeHash(bytes);
        s_StringBuilder.Length = 0;
        for (int i = 0; i < hash.Length; i++)
        {
            s_StringBuilder.Append(hash[i].ToString("X2"));
        }
        return s_StringBuilder.ToString();
    }
    public class VerifyResponse
    {