util

package
v0.0.0-...-6149473 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encrypt

func Encrypt(origin string) (string, error)

func GenerateToken

func GenerateToken(id int, name string) (string, error)

func ValidatePassword

func ValidatePassword(crypted, passwd string) bool

比较加密后的密码和未加密的密码,如果一致返回true,如果不一致返回false

Types

type JwtCustomClaims

type JwtCustomClaims struct {
	ID   int
	Name string
	jwt.RegisteredClaims
}

func ParseToken

func ParseToken(tokenStr string) (JwtCustomClaims, error)

Jump to

Keyboard shortcuts

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