Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WechatPayCipher ¶
type WechatPayCipher struct {
// contains filtered or unexported fields
}
WechatPayCipher 提供微信支付敏感信息加解密功能
为了保证通信过程中敏感信息字段(如用户的住址、银行卡号、手机号码等)的机密性,微信支付API v3要求:
- 商户对上送的敏感信息字段进行加密
- 微信支付对下行的敏感信息字段进行加密
详见:https://wechatpay-api.gitbook.io/wechatpay-api-v3/qian-ming-zhi-nan-1/min-gan-xin-xi-jia-mi
func NewWechatPayCipher ¶
func NewWechatPayCipher(encryptor cipher.Encryptor, decryptor cipher.Decryptor) *WechatPayCipher
NewWechatPayCipher 使用 cipher.Encryptor + cipher.Decryptor 构建一个 WechatPayCipher
Click to show internal directories.
Click to hide internal directories.