Documentation ¶
Index ¶
- func AESDecode(data string, key string) (string, error)
- func AESDecodeByte(data []byte, key []byte) ([]byte, error)
- func AESEncode(data string, key string) (string, error)
- func AESEncodeByte(data []byte, key []byte) ([]byte, error)
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func Base64Decode(data string) (string, error)
- func Base64DecodeByte(data []byte) ([]byte, error)
- func Base64Encode(data string) string
- func Base64EncodeByte(data []byte) []byte
- func CheckMD5(data string, sum string) bool
- func GetHmacSha1(data string, key string) string
- func GetMD5(data string) string
- func GetRandomKey() string
- func GetSha1(data string) string
- func MD5Byte(byts []byte) string
- func MD5Str(str string) string
- func MD5V(str string) string
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func RandomDigits(length int) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func Base64DecodeByte ¶
func Base64Encode ¶
func Base64EncodeByte ¶
func GetHmacSha1 ¶
func GetRandomKey ¶
func GetRandomKey() string
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func RandomDigits ¶
RandomDigits returns a byte slice of the given length containing pseudorandom numbers in range 0-9. The slice can be used as a captcha solution.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.