https://github.com/xialeistudio/go-wxcrypto
wechat encrypt/decrypt library
https://github.com/xialeistudio/go-wxcrypto
Last synced: 2 months ago
JSON representation
wechat encrypt/decrypt library
- Host: GitHub
- URL: https://github.com/xialeistudio/go-wxcrypto
- Owner: xialeistudio
- License: mit
- Created: 2017-11-24T04:00:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-24T08:06:56.000Z (over 7 years ago)
- Last Synced: 2025-03-12T23:02:41.181Z (3 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-wxcrypto
微信开放平台/公众平台加解密golang开发库,目前只提供基本的消息加解密。## 功能
+ [x] 消息加密
+ [x] 消息解密## 下一步
+ [x] 微信GET参数验证
+ [x] 微信XML解析## 微信加密
```go
wx, err:=wxcrypto.NewWxCrypto("EncodingAesKey","APPID")
if err != nil {
panic(err)
}
plainData:="test"
encryptData,err:=wx.Encrypt(plainData)
if err != nil {
panic(err)
}
fmt.Print(encryptData)
```## 微信解密
```go
wx, err:=wxcrypto.NewWxCrypto("EncodingAesKey","APPID")
if err != nil {
panic(err)
}
encryptData:="encryptData"
plainData,err:=wx.Decrypt(encryptData)
if err != nil {
panic(err)
}
fmt.Print(plainData)
```