diff --git a/platformapi/dingdingapi/callback.go b/platformapi/dingdingapi/callback.go index d34e4a59..89175e24 100644 --- a/platformapi/dingdingapi/callback.go +++ b/platformapi/dingdingapi/callback.go @@ -103,7 +103,7 @@ func (a *API) Encrypt(msg string) (encryptedMsg string, err error) { binary.Write(buf, binary.BigEndian, int32(len(msg))) buf.WriteString(msg) buf.WriteString(a.corpID) - binResult, err := utils.AESCBCEncpryt(buf.Bytes(), aesKey, aesKey[:16]) + binResult, err := utils.AESCBCEncpryt(buf.Bytes(), aesKey, []byte(a.corpID[:16])) encryptedMsg = base64.StdEncoding.EncodeToString(binResult) return encryptedMsg, err }