Documentation ¶
Index ¶
- func AESCbcDecrypt(secretKey, src string) string
- func AESCbcEncrypt(secretKey, src string) string
- func DesDecrypt(str, k string) (destr string, err error)
- func DesEncrypt(str, k string) (enstr string, err error)
- func Md5(str string) string
- func Nanoid() string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func Padding(plainText []byte, blockSize int) []byte
- func UnPadding(plainText []byte) []byte
- func Uuid() string
- type AesEncrypter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESCbcDecrypt ¶ added in v0.8.0
func AESCbcEncrypt ¶ added in v0.8.0
func DesDecrypt ¶ added in v0.8.0
func DesEncrypt ¶ added in v0.8.0
func PKCS5Padding ¶ added in v0.8.0
func PKCS5UnPadding ¶ added in v0.8.0
Types ¶
type AesEncrypter ¶ added in v0.8.0
type AesEncrypter struct {
// contains filtered or unexported fields
}
var AesEcpt AesEncrypter
func (*AesEncrypter) AesBase64Decrypt ¶ added in v0.8.0
func (a *AesEncrypter) AesBase64Decrypt(b string) (string, error)
解密
func (*AesEncrypter) AesBase64Encrypt ¶ added in v0.8.0
func (a *AesEncrypter) AesBase64Encrypt(in string) (string, error)
加密
Click to show internal directories.
Click to hide internal directories.