Compare commits
3 Commits
43a81dd6ea
...
21ecde024e
| Author | SHA1 | Date | |
|---|---|---|---|
| 21ecde024e | |||
| e59343e579 | |||
| 556ad55fc2 |
@ -34,14 +34,12 @@ func VerifySignature(paramsMap map[string]interface{}, receivedTimestamp, receiv
|
||||
currentTime := time.Now().Unix() * 1000
|
||||
|
||||
timestamp, err := strconv.ParseInt(receivedTimestamp, 10, 64)
|
||||
fmt.Println(currentTime)
|
||||
fmt.Println(timestamp)
|
||||
|
||||
if err != nil {
|
||||
return errors.New("签名错误")
|
||||
}
|
||||
|
||||
if currentTime-timestamp > 1500 {
|
||||
if currentTime-timestamp > 5000 {
|
||||
return errors.New("签名超时")
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user