Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface {
//Cache() cache.Cache
GetAuthUrl(client, redirectUrl string, authType int) (string, error) // 获取授权链接
GetAuthorizerAppId(authCode string) (string, error) // 通过authCode获取授权应用的appId
GetAuthorizerInfo(appId string) (*provider.GetAuthorizerInfoResult, error) // 获取授权应用的信息
HandleEvent(event *Event, handlers map[EventKind]EventHandler) error // 处理授权事件
}
type CBCEncryptor ¶
type CBCEncryptor struct {
// contains filtered or unexported fields
}
CBCEncryptor 加解密核心类
type EncryptResult ¶
type EventProcessor ¶
type PKCS7Encoder ¶
type PKCS7Encoder struct {
BlockSize int
}
PKCS7Encoder PKCS7填充
func (*PKCS7Encoder) Decode ¶
func (p *PKCS7Encoder) Decode(decrypted []byte) []byte
Decode PKCS7去除填充
type WXBizMsgCrypt ¶
type WXBizMsgCrypt struct {
// contains filtered or unexported fields
}
WXBizMsgCrypt 微信消息加解密主类
func NewWXBizMsgCrypt ¶
func NewWXBizMsgCrypt(appId, token, encodingAESKey string) (*WXBizMsgCrypt, error)
NewWXBizMsgCrypt 创建WXBizMsgCrypt实例
func (*WXBizMsgCrypt) DecryptMsg ¶
func (w *WXBizMsgCrypt) DecryptMsg(msgSignature, timestamp, nonce, body string) ([]byte, error)
DecryptMsg 解密消息
func (*WXBizMsgCrypt) EncryptMsg ¶
func (w *WXBizMsgCrypt) EncryptMsg(replyMsg, nonce string, timestamp ...string) (*EncryptResult, error)
EncryptMsg 加密消息
Source Files
¶
Click to show internal directories.
Click to hide internal directories.