|
@@ -23,6 +23,7 @@ import (
|
23
|
23
|
"crypto/hmac"
|
24
|
24
|
"crypto/sha1"
|
25
|
25
|
"encoding/base64"
|
|
26
|
+ "fmt"
|
26
|
27
|
"hash"
|
27
|
28
|
"io"
|
28
|
29
|
"sort"
|
|
@@ -76,8 +77,17 @@ func (hs *paramsSorter) Swap(i, j int) {
|
76
|
77
|
|
77
|
78
|
// 做签名处理
|
78
|
79
|
func doSign(params map[string]string, secretKey string) string {
|
|
80
|
+ fmt.Println("params")
|
|
81
|
+ fmt.Println(params)
|
|
82
|
+
|
|
83
|
+ fmt.Println("secretKey")
|
|
84
|
+ fmt.Println(secretKey)
|
|
85
|
+
|
79
|
86
|
hs := newParamsSorter(params)
|
80
|
87
|
|
|
88
|
+ fmt.Println("hs")
|
|
89
|
+ fmt.Println(hs)
|
|
90
|
+
|
81
|
91
|
// Sort the temp by the Ascending Order
|
82
|
92
|
hs.Sort()
|
83
|
93
|
|