(encodedAESKey string)
| 107 | } |
| 108 | |
| 109 | func aesKeyDecode(encodedAESKey string) (key []byte, err error) { |
| 110 | if len(encodedAESKey) != 43 { |
| 111 | err = fmt.Errorf("the length of encodedAESKey must be equal to 43") |
| 112 | return |
| 113 | } |
| 114 | key, err = base64.StdEncoding.DecodeString(encodedAESKey + "=") |
| 115 | if err != nil { |
| 116 | return |
| 117 | } |
| 118 | if len(key) != 32 { |
| 119 | err = fmt.Errorf("encodingAESKey invalid") |
| 120 | return |
| 121 | } |
| 122 | return |
| 123 | } |
| 124 | |
| 125 | // AESDecryptMsg ciphertext = AES_Encrypt[random(16B) + msg_len(4B) + rawXMLMsg + appId] |
| 126 | // 参考:github.com/chanxuehong/wechat.v2 |
no outgoing calls
no test coverage detected
searching dependent graphs…