From 797c55e1253cad35c48b77c2928b4013f169c9d5 Mon Sep 17 00:00:00 2001 From: 陆恒 Date: Tue, 19 May 2020 14:10:22 +0800 Subject: [PATCH] 提亀 --- src/HttpServer/logic/function.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/HttpServer/logic/function.go b/src/HttpServer/logic/function.go index 907c8ec..7bb89da 100644 --- a/src/HttpServer/logic/function.go +++ b/src/HttpServer/logic/function.go @@ -6,7 +6,7 @@ import ( "bytes" "common/logger" "common/redis" - "crypto/sha1" + "crypto/md5" "encoding/hex" "encoding/json" "errors" @@ -777,11 +777,13 @@ func GettotalParam(paramlist []string) string { } func GetHashValue(signsum string) string { - h := sha1.New() + /*h := sha1.New() h.Write([]byte(signsum)) bs := h.Sum(nil) - sign := hex.EncodeToString(bs) - return sign + sign := hex.EncodeToString(bs)*/ + ctx := md5.New() + ctx.Write([]byte(signsum)) + return hex.EncodeToString(ctx.Sum(nil)) } func DoHttpPost(bys []byte, apistr string) (string, error) { -- libgit2 0.21.0