Beispiel #1
0
        public static NewRegRequest CreateNewRegRequestEntity(BaseRequest br, string wxAccount, string wxPwd, string nickName, string ticket, byte[] randomEncryKey,
                                                              ECDHKey cliPubECDHKey, string clientid, string androidid, string fingerprint, string mac, string regID)
        {
            NewRegRequest.Builder nggb = new NewRegRequest.Builder();
            nggb.SetBase(br);
            nggb.SetUserName("");
            string strPwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(wxPwd, "MD5");

            nggb.SetPwd(strPwd);
            nggb.SetNickName(nickName);
            nggb.SetBindUin(0);
            nggb.SetBindEmail("");
            nggb.SetBindMobile(wxAccount);
            nggb.SetTicket(ticket);
            nggb.SetBuiltinIPSeq(0);
            nggb.SetDLSrc(0);
            nggb.SetRegMode(1);
            nggb.SetTimeZone("8.00");
            nggb.SetLanguage("zh_CN");
            nggb.SetForceReg(1);
            nggb.SetRealCountry("cn");
            SKBuiltinBuffer_t.Builder skbb = new SKBuiltinBuffer_t.Builder();
            skbb.SetILen(16);
            byte[] randomKey = randomEncryKey;
            skbb.SetBuffer(ByteString.CopyFrom(randomKey));
            SKBuiltinBuffer_t sbk = skbb.Build();

            nggb.SetRandomEncryKey(sbk);
            nggb.SetAlias("");
            nggb.SetVerifyContent("");
            nggb.SetVerifySignature("");
            nggb.SetHasHeadImg(0);
            nggb.SetSuggestRet(0);
            nggb.SetClientSeqId(clientid);
            //nggb.SetBundleId("");
            nggb.SetCliPubEcdhkey(cliPubECDHKey);
            //nggb.SetBundleId("");
            nggb.SetGoogleAid("");
            nggb.SetMobileCheckType(0);
            nggb.SetBioSigCheckType(0);
            nggb.SetRegSessionId(regID);
            nggb.SetAndroidInstallRef("");
            nggb.SetAndroidId(androidid);
            nggb.SetClientFingerprint(fingerprint);
            nggb.SetMacAddr(mac);

            NewRegRequest ngg = nggb.Build();

            return(ngg);
        }