Commit 797c55e1253cad35c48b77c2928b4013f169c9d5
1 parent
2d7fb980
Exists in
master
and in
4 other branches
提交
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
src/HttpServer/logic/function.go
... | ... | @@ -6,7 +6,7 @@ import ( |
6 | 6 | "bytes" |
7 | 7 | "common/logger" |
8 | 8 | "common/redis" |
9 | - "crypto/sha1" | |
9 | + "crypto/md5" | |
10 | 10 | "encoding/hex" |
11 | 11 | "encoding/json" |
12 | 12 | "errors" |
... | ... | @@ -777,11 +777,13 @@ func GettotalParam(paramlist []string) string { |
777 | 777 | } |
778 | 778 | |
779 | 779 | func GetHashValue(signsum string) string { |
780 | - h := sha1.New() | |
780 | + /*h := sha1.New() | |
781 | 781 | h.Write([]byte(signsum)) |
782 | 782 | bs := h.Sum(nil) |
783 | - sign := hex.EncodeToString(bs) | |
784 | - return sign | |
783 | + sign := hex.EncodeToString(bs)*/ | |
784 | + ctx := md5.New() | |
785 | + ctx.Write([]byte(signsum)) | |
786 | + return hex.EncodeToString(ctx.Sum(nil)) | |
785 | 787 | } |
786 | 788 | |
787 | 789 | func DoHttpPost(bys []byte, apistr string) (string, error) { | ... | ... |