mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-04 12:52:27 +08:00
@@ -65,7 +65,7 @@ func AESEncryptMsg(random, rawXMLMsg []byte, appID string, aesKey []byte) (ciphe
|
||||
}
|
||||
|
||||
// 加密
|
||||
block, err := aes.NewCipher(aesKey[:])
|
||||
block, err := aes.NewCipher(aesKey)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ func Signature(params ...string) string {
|
||||
sort.Strings(params)
|
||||
h := sha1.New()
|
||||
for _, s := range params {
|
||||
io.WriteString(h, s)
|
||||
_, _ = io.WriteString(h, s)
|
||||
}
|
||||
return fmt.Sprintf("%x", h.Sum(nil))
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ package util
|
||||
import "time"
|
||||
|
||||
//GetCurrTs return current timestamps
|
||||
func GetCurrTs() int64 {
|
||||
func GetCurrTS() int64 {
|
||||
return time.Now().Unix()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user