up
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
|
||||
"git.rosy.net.cn/baseapi"
|
||||
)
|
||||
|
||||
func AESCBCEncpryt(data, aesKey, iv []byte) (encryptedData []byte, err error) {
|
||||
@@ -33,6 +35,7 @@ func AESCBCDecpryt(encryptedData, aesKey, iv []byte) (decryptedData []byte, err
|
||||
func PKCSUnPadding(origData []byte) []byte {
|
||||
length := len(origData)
|
||||
unpadding := int(origData[length-1])
|
||||
baseapi.SugarLogger.Debug("PKCSUnPadding length:%d, unpadding:%d", length, unpadding)
|
||||
return origData[:(length - unpadding)]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user