wxcrypt

package module
v0.0.0-...-0af490c Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 10 Imported by: 0

README

wx_crypt

微信搜索接口的加解密代码包,官方没有Golang的实现,我就根据官方的实现了一个。

调用说明

直接参考wx_biz_msg_crypt_test.go文件里的方式调用即可。

Documentation

Index

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 加密消息

Jump to

Keyboard shortcuts

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