signT

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Sign          = "sign"
	SignKey       = "sign-key"
	SignMsg       = "sign-msg"
	SignAuth      = "sign-auth"
	SignError     = "signature verification failed"
	SignEffective = "signature verification success"
	// 务必配置密钥,否则将无法通过签名验证
	SignSecret = randomT.GenRandomStr(32)
	// 签名过期时间,单位为毫秒
	SignTimeOut int64 = 60 * 10 * 1000
)

Functions

func GenerateSignature

func GenerateSignature(data string, timestamp int64) string

func SignAuthMiddleware

func SignAuthMiddleware() gin.HandlerFunc

func VerifySignature

func VerifySignature(data string, signature string, timestamp int64) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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