Versions in this module Expand all Collapse all v1 v1.0.0 May 8, 2021 Changes in this version + const ComputeSignatureError + const DecryptAESError + const EncryptAESError + const IllegalAesKey + const IllegalBuffer + const OK + const ParseXmlError + const ValidateAppidError + const ValidateSignatureError + const WechatCryptorEncryptMsgFormat + func SHA1(token, timestamp, nonce, encrypt string) string + func WechatCryptorRandomStr() string + type WechatCryptor struct + func NewWechatCryptor(appId, token, encodingAesKey string) (*WechatCryptor, error) + func (cryptor *WechatCryptor) Decrypt(text string) (string, error) + func (cryptor *WechatCryptor) DecryptMsg(msgSign, timeStamp, nonce, postData string) (string, error) + func (cryptor *WechatCryptor) DecryptMsgContent(msgSign, timeStamp, nonce, encrypt string) (string, error) + func (cryptor *WechatCryptor) Encrypt(randomStr, text string) (string, error) + func (cryptor *WechatCryptor) EncryptMsg(msg, timeStamp, nonce string) (string, error) + func (cryptor *WechatCryptor) EncryptMsgContent(msg, timeStamp, nonce string) (string, string, string, string, error) + func (cryptor *WechatCryptor) String() string + type WechatCryptorError struct + Code int + func (e *WechatCryptorError) Error() string + type WechatCryptorPostBody struct + AppId string + Encrypt string + ToUserName string + XMLName xml.Name