From 1cc6a905c430722a9319e527656950145bbb370d Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Tue, 17 Aug 2021 15:24:58 +0800 Subject: [PATCH] aa --- platformapi/dingdingapi/callback.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platformapi/dingdingapi/callback.go b/platformapi/dingdingapi/callback.go index 8ae9137d..ec76d4b0 100644 --- a/platformapi/dingdingapi/callback.go +++ b/platformapi/dingdingapi/callback.go @@ -250,9 +250,13 @@ func (c *DingTalkCrypto) GetDecryptMsg(signature, timestamp, nonce, secretMsg st if len(decode) < aes.BlockSize { return "", errors.New("ERROR: 密文太短") } + fmt.Println("c", c) + fmt.Println("c.Block", c.Block) + fmt.Println("c.BKey", c.BKey) + fmt.Println("c.c.Block.BlockSize()", c.Block.BlockSize()) + fmt.Println("c.BKey[:c.Block.BlockSize()]", c.BKey[:c.Block.BlockSize()]) blockMode := cipher.NewCBCDecrypter(c.Block, c.BKey[:c.Block.BlockSize()]) plantText := make([]byte, len(decode)) - blockMode.CryptBlocks(plantText, decode) plantText = pkCS7UnPadding(plantText) size := binary.BigEndian.Uint32(plantText[16:20])