up
This commit is contained in:
@@ -32,11 +32,11 @@ func AESCBCDecpryt(encryptedData, aesKey, iv []byte) (decryptedData []byte, err
|
|||||||
return decryptedData, nil
|
return decryptedData, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func PKCSUnPadding(origData []byte) []byte {
|
func PKCSUnPadding(originData []byte) []byte {
|
||||||
length := len(origData)
|
length := len(originData)
|
||||||
unpadding := int(origData[length-1])
|
unpadding := int(originData[length-1])
|
||||||
baseapi.SugarLogger.Debug("PKCSUnPadding length:%d, unpadding:%d", length, unpadding)
|
baseapi.SugarLogger.Debug("PKCSUnPadding length:%d, unpadding:%d", length, unpadding)
|
||||||
return origData[:(length - unpadding)]
|
return originData[:(length - unpadding)]
|
||||||
}
|
}
|
||||||
|
|
||||||
func PKCSPadding(ciphertext []byte, blockSize int) []byte {
|
func PKCSPadding(ciphertext []byte, blockSize int) []byte {
|
||||||
|
|||||||
Reference in New Issue
Block a user