utils

package
v0.0.0-...-9b971e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainStr

func ContainStr(items []string, item string) bool

ContainStr 判断字符串数组中是否包含某个元素

func DecryptAES

func DecryptAES(cipherText, key string) (string, error)

DecryptAES AES解密

func DecryptJwt

func DecryptJwt(token string) (string, error)

DecryptJwt 获取jwt中原始数据(id)

func EncryptAES

func EncryptAES(plainText, key string) (string, error)

EncryptAES AES加密

func EncryptJwt

func EncryptJwt(uid string) (string, error)

EncryptJwt 生成jwt token

func MD5

func MD5(plainText string) string

MD5 MD5简单加密

func MD5Mix

func MD5Mix(plainText string) string

MD5Mix MD5加密后混淆

func RandomNumber

func RandomNumber(len int) string

随机数字

func RandomString

func RandomString(len int) string

随机字符串

func StructAssign

func StructAssign(src, dist interface{})

StructAssign 从src中拷贝相同的字段到dist中

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL