Versions in this module Expand all Collapse all v1 v1.0.0 Jun 16, 2021 Changes in this version + const AES_Block_Size + const DataLengthLen + const EncodingAESKeyLen + func GetErrMessage(errcode WXBizMsgCryptErr) string + func RemoveSurplusCharactorsInXmlOrJson(src string) string + type AES_Mode int + const AES_MODE_CBC + const AES_MODE_CCM + const AES_MODE_CFB + const AES_MODE_CTR + const AES_MODE_EAX + const AES_MODE_ECB + const AES_MODE_GCM + const AES_MODE_OCB + const AES_MODE_OFB + const AES_MODE_OPENPGP + const AES_MODE_SIV + type AesTextResp struct + MsgEncrypt CDATA + MsgSignature CDATA + Nonce CDATA + TimeStamp string + XMLName xml.Name + type CDATA struct + Text string + type PKCS7Encoder struct + BlockSize int + func NewDefaultPKCS7Encoder() PKCS7Encoder + type Prpcrypt struct + Key []byte + Mode AES_Mode + type SHA1 struct + type TextMsg struct + Content CDATA + CreateTime CDATA + Encrypt CDATA + MsgId CDATA + MsgType CDATA + ToUserName CDATA + XMLName xml.Name + type WXBizMsgCrypt struct + Appid string + Format string + IgnSig bool + Key []byte + Token string + func NewDefaultWXBizMsgCrypt(token, keyStr, appid string) WXBizMsgCrypt + func NewTestWXBizMsgCrypt(token, keyStr, appid, format string, ignoreSig bool) WXBizMsgCrypt + func NewWXBizMsgCrypt(token, keyStr, appid, format string) WXBizMsgCrypt + func (wxcrypt WXBizMsgCrypt) DecryptMsg(postData string, msgSignature string, timestamp string, nonce string) (string, WXBizMsgCryptErr) + func (wxcrypt WXBizMsgCrypt) EncryptMsg(replyData string, nonce string, timestamp string) (string, WXBizMsgCryptErr) + type WXBizMsgCryptErr int32 + const WXBizMsgCrypt_ComputeSignatureError + const WXBizMsgCrypt_DecodeBase64Error + const WXBizMsgCrypt_DecryptAESError + const WXBizMsgCrypt_EncodeBase64Error + const WXBizMsgCrypt_EncryptAESError + const WXBizMsgCrypt_GenReturnXmlError + const WXBizMsgCrypt_IllegalAesKey + const WXBizMsgCrypt_IllegalBuffer + const WXBizMsgCrypt_OK + const WXBizMsgCrypt_ParseXmlError + const WXBizMsgCrypt_ValidateAppidError + const WXBizMsgCrypt_ValidateSignatureError + type XMLParse struct