utils

package
v0.0.0-...-4423e67 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BcryptCheck

func BcryptCheck(password, hash string) bool

BcryptCheck 对比明文密码和数据库的哈希值

func BcryptHash

func BcryptHash(password string) string

BcryptHash 使用 bcrypt 对密码进行加密

func ContainsString

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

ContainsString 字符串数组中是否包含某字符串

func ContainsUint

func ContainsUint(items []uint, item uint) bool

ContainsUint uint数组中是否包含某uint

func InterfaceArray2StringArray

func InterfaceArray2StringArray(array1 []interface{}) (array2 []string)

InterfaceArray2StringArray 将interface数组转换为字符串数组

func InterfaceArray2UintArray

func InterfaceArray2UintArray(array1 []interface{}) (array2 []uint, ok bool)

InterfaceArray2UintArray 将interface数组转换成uint数组

func MD5

func MD5(str []byte, b ...byte) string

MD5 进行md5编码

func NewRandStringRunes

func NewRandStringRunes(n int) string

NewRandStringRunes 从表里字符生成随机串

func NewUUID

func NewUUID() string

NewUUID 从表里字符生成UUID

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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