util

package
v0.0.0-...-233306d Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(cryted string, key string) string

AES解密

func AESEncrypt

func AESEncrypt(orig string, key string) string

AES加密

func GenerateToken

func GenerateToken(str string) (string, error)

生成token

func GetJWTSecret

func GetJWTSecret() []byte

func GetSnowflake

func GetSnowflake() (*snowflake.ID, error)

获取雪花ID

func GetUUID

func GetUUID() uuid.UUID

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blocksize int) []byte

补码

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

去码

func RandomString

func RandomString(n int, allowedChars string) string

获取随机字符串

func SendTextEmail

func SendTextEmail(emailArr []string, subject string, textContent string) error

发送文本邮箱

func VerifyParm

func VerifyParm(s interface{}) error

校验参数

Types

type Claims

type Claims struct {
	Info string `json:"info"`
	jwt.StandardClaims
}

func ParseToken

func ParseToken(token string) (*Claims, error)

解析token

Jump to

Keyboard shortcuts

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