Documentation ¶
Index ¶
- Constants
- func Base64Decode(data string) ([]byte, string)
- func Base64Encode(data []byte) string
- func EncryptAesBase64(d string) (string, error)
- func HexAesEncrypt(key, input string) (string, error)
- func HexMd5Sign(p, t, k interface{}) string
- func HexMd5String(str string) string
- func Md5(str string) string
- func NewCipher(key []byte) (cipher.Block, error)
- func NewCipherWithRounds(key []byte, rounds int) (cipher.Block, error)
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func PasswordMD5(passwd, salt string) string
- func ToMd5(data []byte) string
- func UrlBase64Encode(src []byte) string
Constants ¶
View Source
const ( // BlockSize TEA BlockSize 单位byte BlockSize = 8 // KeySize TEA 算法 Key的byte长度. KeySize = 16 )
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
func EncryptAesBase64 ¶
EncryptAesBase64 先做AES加密,再做base64加密
func HexAesEncrypt ¶
func HexMd5Sign ¶
func HexMd5Sign(p, t, k interface{}) string
func HexMd5String ¶
func NewCipherWithRounds ¶
NewCipherWithRounds 加密算法构造器,key 长度必须是 16 byte
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func PasswordMD5 ¶
* * PasswordMD5 密码加密 * @Description: create Account password MD5 * @param passwd 密码 * @return: string
func UrlBase64Encode ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.