Documentation ¶
Overview ¶
AES CBC PKCS5Padding加/解密
使用 hex.Encode
查看测试文件: aes_cbc_test.go
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 Get(key string) string
- func GetUUID() (string, error)
- func PKCS5Padding(cipherText []byte, blockSize int, after int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func Set(key, val 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 PKCS5Padding ¶
PKCS5Padding PKCS5Padding
Types ¶
type XXTea ¶
type XXTea struct {
Key string
}
func (*XXTea) DecryptString ¶
DecryptString DecryptString key通过NewXXtea传递
func (*XXTea) EncryptString ¶
EncryptString EncryptString key通过NewXXtea传递
Click to show internal directories.
Click to hide internal directories.