Documentation ¶
Overview ¶
Package signers 微信支付api v3 go http-client 签名生成器
Package signers 微信支付api v3 go http-client 签名生成器
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sha256WithRsa ¶
func Sha256WithRsa(source string, privateKey *rsa.PrivateKey) (signature string, err error)
Sha256WithRsa 通过私钥对字符串进行sha256rsa的方式加密,生成签名信息
Types ¶
type Sha256WithRSASigner ¶
type Sha256WithRSASigner struct { MchCertificateSerialNo string // 商户证书序列号 PrivateKey *rsa.PrivateKey // 商户私钥 }
Sha256WithRSASigner Sha256WithRSA 签名器
func (*Sha256WithRSASigner) GetName ¶
func (s *Sha256WithRSASigner) GetName() string
GetName 获取签名器的名称
func (*Sha256WithRSASigner) Sign ¶
func (s *Sha256WithRSASigner) Sign(ctx context.Context, message string) (*auth.SignatureResult, error)
对信息使用Sha256WithRsa的方式进行签名
Click to show internal directories.
Click to hide internal directories.