aa
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user