|
@@ -111,7 +111,7 @@ func commonFunc(w http.ResponseWriter, r *http.Request, js *simplejson.Json, bod
|
|
func checkSignature(body []byte, timestamp, signature string) bool {
|
|
func checkSignature(body []byte, timestamp, signature string) bool {
|
|
|
|
|
|
sha1Contain := sha1.New()
|
|
sha1Contain := sha1.New()
|
|
- byteSha1 := append(body, append([]byte(timestamp), []byte("coinsapi^&#@(*33")...)...)
|
|
|
|
|
|
+ byteSha1 := append(body, append([]byte(timestamp), []byte(Gconfig.CoinType.Sigkey)...)...)
|
|
sha1Contain.Write(byteSha1)
|
|
sha1Contain.Write(byteSha1)
|
|
localSig := hex.EncodeToString(sha1Contain.Sum(nil))
|
|
localSig := hex.EncodeToString(sha1Contain.Sum(nil))
|
|
log.Debug("caculate local signature:%v", localSig)
|
|
log.Debug("caculate local signature:%v", localSig)
|