security

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: MIT Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomKey16

func GenerateRandomKey16() string

GenerateRandomKey16 生成16为随机字符串

func GenerateRandomKey20

func GenerateRandomKey20() string

GenerateRandomKey20 生成20位随机字符串

func GenerateRandomKey6

func GenerateRandomKey6() string

GenerateRandomKey6 生成6为随机字符串

func SetPassword

func SetPassword(password string, salt string) (verify string, err error)

SetPassword 根据明文密码和加盐值生成密码

Types

type Verifier

type Verifier interface {
	GetUserID() string
	GetTenantID() string
	GetRoleID() string
	GetEmail() string
	GetUsername() string
	Verify(tenantID string, username string, password string) (bool, Verifier, error)
}

Verifier 用户验证器

Jump to

Keyboard shortcuts

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