Documentation ¶
Index ¶
- func AesDecrypt(encrypted, cip string) (string, error)
- func AesEncrypt(origin, cip string) (string, error)
- func Base64Decoding(s string) string
- func Base64Encoding(s string) string
- func GetRandomNumber(l int) string
- func GetRandomPureString(l int) string
- func GetRandomString(l int) string
- func JoinStringArr(strs, str string, dep string) string
- func Md5(s string) string
- func PKCS7Padding(plaintext []byte, blockSize int) []byte
- func Sha1(s string) string
- func UnPKCS7Padding(origData []byte) []byte
- func Uuid() string
- type WxEncryptedData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
*
- @name: aes 解密
- @description:
- @param {*} encrypted 加密字符串
- @param {string} cip 密文
- @return {*}
func AesEncrypt ¶
*
- @name: AES加密 cbc
- @description:
- @param {*} origin 需要加密的字符串
- @param {string} cip 密文
- @return {*}
func Base64Decoding ¶
func JoinStringArr ¶
*
- @name: 向字符串增加字符
- @description:
- @param {*} strs 使用dep隔开的字符串
- @param {string} str 需要添加的字符串
- @param {string} dep
- @return {*}
func PKCS7Padding ¶
func UnPKCS7Padding ¶
Types ¶
type WxEncryptedData ¶ added in v0.2.6
type WxEncryptedData struct { OpenId string `json:"openId"` NickName string `json:"nickName"` Gender string `json:"gender"` City string `json:"city"` Province string `json:"province"` Country string `json:"country"` AvatarUrl string `json:"avatarUrl"` UnionId string `json:"unionId"` Watermark struct { Appid string `json:"appid"` Timestamp string `json:"timestamp"` } `json:"watermark"` }
func AesDecryptWxEncryptedData ¶ added in v0.2.6
func AesDecryptWxEncryptedData(encryptData, sessionKey, iv string) (WxEncryptedData, error)
Click to show internal directories.
Click to hide internal directories.