signature

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptoFunc added in v0.0.9

type CryptoFunc func(b, k []byte) []byte

CryptoFunc 签名加密函数

type Signature

type Signature interface {
	// Generate 生成签名
	Generate(params any) (auth string, ts int64, err error)
	// Verify 验证签名
	Verify(auth string, ts int64, params any) (ok bool, err error)
}

func New

func New(key, secret string, ttl time.Duration) Signature

func NewCrypto added in v0.0.9

func NewCrypto(key, secret string, ttl time.Duration, f CryptoFunc) Signature

func NewSha256 added in v0.0.9

func NewSha256(key, secret string, ttl time.Duration) Signature

Jump to

Keyboard shortcuts

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