sign

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checks2sSign

func Checks2sSign(timestamp, nonce, sign, secret string) bool

func Sha1Sign

func Sha1Sign(params ...string) string

func WxPaySign

func WxPaySign(params map[string]string, signType string, PayKey string) (sign, str string, err error)

实现微信支付签名 https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=4_3 signType = MD5 | HMAC-SHA256 PayKey =支付密钥

Types

type Apisign01

type Apisign01 struct {
	// contains filtered or unexported fields
}

签名算法1

func NewApiSign01

func NewApiSign01() *Apisign01

func (*Apisign01) AppendParam

func (this *Apisign01) AppendParam(k string, v interface{}) *Apisign01

func (Apisign01) GetSignString

func (this Apisign01) GetSignString() string

func (*Apisign01) Md5Sign

func (this *Apisign01) Md5Sign() string

func (*Apisign01) SetParams

func (this *Apisign01) SetParams(p map[string]interface{}) *Apisign01

func (*Apisign01) SetSecret

func (this *Apisign01) SetSecret(s string) *Apisign01

type UrlGetSign

type UrlGetSign struct {
	// contains filtered or unexported fields
}

func NewUrlGetSign

func NewUrlGetSign() *UrlGetSign

sign.NewUrlGetSign().SetSecret("cjsJellySecret123456").AutoSpellUrlParam

func (*UrlGetSign) AutoSpellUrlParam

func (u *UrlGetSign) AutoSpellUrlParam() string

自动生成拼的url参数

func (*UrlGetSign) GetNonce

func (u *UrlGetSign) GetNonce() string

func (*UrlGetSign) GetSecret

func (u *UrlGetSign) GetSecret() string

func (*UrlGetSign) GetSign

func (u *UrlGetSign) GetSign() string

func (*UrlGetSign) GetTimestamp

func (u *UrlGetSign) GetTimestamp() string

func (*UrlGetSign) SetNonce

func (u *UrlGetSign) SetNonce(s_nonce string) *UrlGetSign

func (*UrlGetSign) SetSecret

func (u *UrlGetSign) SetSecret(s string) *UrlGetSign

func (*UrlGetSign) SetTimestamp

func (u *UrlGetSign) SetTimestamp(s_timestamp string) *UrlGetSign

Jump to

Keyboard shortcuts

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