README ¶ wx_crypt 微信搜索接口的加解密代码包,官方没有Golang的实现,我就根据官方的实现了一个。 调用说明 直接参考wx_biz_msg_crypt_test.go文件里的方式调用即可。 Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func GetSHA1(strs ...string) string type WxCrypt func (c *WxCrypt) DecryptMsg(msgSignature, timestamp, nonce, encryptMsg string) ([]byte, error) func (c *WxCrypt) EncryptMsg(msgBytes []byte, timestamp, nonce string) (string, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetSHA1 ¶ func GetSHA1(strs ...string) string GetSHA1 用SHA1算法生成安全签名 Types ¶ type WxCrypt ¶ type WxCrypt struct { Token string AesKey string AppID string } WxCrypt 微信加解密 func (*WxCrypt) DecryptMsg ¶ func (c *WxCrypt) DecryptMsg(msgSignature, timestamp, nonce, encryptMsg string) ([]byte, error) DecryptMsg 解密消息 func (*WxCrypt) EncryptMsg ¶ func (c *WxCrypt) EncryptMsg(msgBytes []byte, timestamp, nonce string) (string, error) EncryptMsg 加密消息 Source Files ¶ View all Source files pkcs7_encoder.go prpcrypt.go sha1.go wx_biz_msg_crypt.go Click to show internal directories. Click to hide internal directories.