Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CBCEncryptor ¶ added in v0.2.0
type CBCEncryptor struct {
// contains filtered or unexported fields
}
CBCEncryptor 加解密核心类
type EncryptResult ¶ added in v0.2.0
type PKCS7Encoder ¶ added in v0.2.0
type PKCS7Encoder struct {
BlockSize int
}
PKCS7Encoder PKCS7填充
func (*PKCS7Encoder) Decode ¶ added in v0.2.0
func (p *PKCS7Encoder) Decode(decrypted []byte) []byte
Decode PKCS7去除填充
func (*PKCS7Encoder) Encode ¶ added in v0.2.0
func (p *PKCS7Encoder) Encode(text []byte) []byte
Encode PKCS7填充
type WXBizMsgCrypt ¶ added in v0.2.0
type WXBizMsgCrypt struct {
// contains filtered or unexported fields
}
WXBizMsgCrypt 微信消息加解密主类
func NewBizMsgCrypt ¶ added in v0.2.0
func NewBizMsgCrypt(appId, token, encodingAESKey string) (*WXBizMsgCrypt, error)
NewBizMsgCrypt 创建WXBizMsgCrypt实例
func (*WXBizMsgCrypt) Decrypt ¶ added in v0.2.0
func (w *WXBizMsgCrypt) Decrypt(msgSignature, timestamp, nonce, body string) ([]byte, error)
Decrypt 解密消息
func (*WXBizMsgCrypt) Encrypt ¶ added in v0.2.0
func (w *WXBizMsgCrypt) Encrypt(replyMsg, nonce string, timestamp ...string) (*EncryptResult, error)
Encrypt 加密消息
Click to show internal directories.
Click to hide internal directories.