This commit is contained in:
suyl
2021-08-17 15:16:36 +08:00
parent 5acde71be4
commit 635bfc39fe

View File

@@ -252,6 +252,7 @@ func (c *DingTalkCrypto) GetDecryptMsg(signature, timestamp, nonce, secretMsg st
}
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])