Documentation ¶
Overview ¶
AES CBC PKCS5Padding加/解密
使用 hex.Encode
查看测试文件: aes_cbc_test.go
http client 使用github.com/imroc/req库 返回string,如果需要到struct,需要自己反序列化
Index ¶
- func AESDecrypt(decodeStr string, key string) (string, error)
- func AESEncrypt(plainText string, key string) string
- func Decrypt(data []byte, key []byte) []byte
- func Encrypt(data []byte, key []byte) []byte
- func FileExist(file string) error
- func GetUUID() (string, error)
- func HttpGet(url string) (ret string, err error)
- func HttpPost(url string, param req.Param) (ret string, err error)
- func IntDateTime(val int64) (ret string)
- func IntDateTimeFormat(val int64, format string) (ret string)
- func MD5(str string) string
- func PKCS5Padding(cipherText []byte, blockSize int, after int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func TimeFormat(t time.Time, format string) string
- type XXTea
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
Decrypt the data with key. data is the bytes to be decrypted. key is the decrypted key. It is the same as the encrypt key.
func Encrypt ¶
Encrypt the data with key. data is the bytes to be encrypted. key is the encrypt key. It is the same as the decrypt key.
func IntDateTimeFormat ¶
DateTimeFormat DateTimeFormat
func PKCS5Padding ¶
PKCS5Padding PKCS5Padding
Types ¶
type XXTea ¶
type XXTea struct {
Key string
}
func (*XXTea) DecryptString ¶
DecryptString DecryptString
func (*XXTea) EncryptString ¶
EncryptString EncryptString
Source Files ¶
Click to show internal directories.
Click to hide internal directories.