From 4f8930892464c578b6e872e87e3561a9867f8034 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期二, 04 九月 2018 20:58:13 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 Utility/LanguageVerify.cs |   19 +++----------------
 1 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/Utility/LanguageVerify.cs b/Utility/LanguageVerify.cs
index 26d64c7..4ded5ff 100644
--- a/Utility/LanguageVerify.cs
+++ b/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
     {

--
Gitblit v1.8.0