Documentation ¶
Index ¶
Constants ¶
View Source
const ( LETTERDIGITS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" LD_COUNT = 62 )
View Source
const ( WXBizMsgCrypt_OK = 0 WXBizMsgCrypt_ValidateSignature_Error = -40001 WXBizMsgCrypt_ParseXml_Error = -40002 WXBizMsgCrypt_ComputeSignature_Error = -40003 WXBizMsgCrypt_IllegalAesKey = -40004 WXBizMsgCrypt_ValidateAppid_Error = -40005 WXBizMsgCrypt_EncryptAES_Error = -40006 WXBizMsgCrypt_DecryptAES_Error = -40007 WXBizMsgCrypt_IllegalBuffer = -40008 WXBizMsgCrypt_EncodeBase64_Error = -40009 WXBizMsgCrypt_DecodeBase64_Error = -40010 WXBizMsgCrypt_GenReturnXml_Error = -40011 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PKCS7Encoder ¶
type PKCS7Encoder struct {
// contains filtered or unexported fields
}
提供基于PKCS7算法的加解密接口
func NewPKCS7Encoder ¶
func NewPKCS7Encoder() *PKCS7Encoder
type WXBizMsgCrypt ¶
type WXBizMsgCrypt interface { EncryptMsg(sReplyMsg string, sNonce string, timestamp int64) (int, string) DecryptMsg(sPostData, sMsgSignature string, sTimeStamp int64, sNonce string) (int, string) }
func NewWXBizMsgCrypt ¶
func NewWXBizMsgCrypt(sToken, sEncodingAESKey, sAppId string) (WXBizMsgCrypt, error)
sToken: 公众平台上,开发者设置的Token sEncodingAESKey: 公众平台上,开发者设置的EncodingAESKey sAppId: 企业号的AppId
Click to show internal directories.
Click to hide internal directories.