|
|
-`);let s=PE.HmacSHA256(i,this.PRIVATEKEY);return PE.enc.Base64.stringify(s)}_utc(){return Math.round(Date.now()/1e3)}_isNumber(t){return t!==null&&(typeof t=="number"&&!isNaN(t-0)||typeof t=="object"&&t.constructor===Number)}_isString(t){return typeof t=="string"}genSigWithUserbuf(t,n,r){let o=this._utc(),i={"TLS.ver":"2.0","TLS.identifier":t,"TLS.sdkappid":this.SDKAPPID,"TLS.time":o,"TLS.expire":n},s="";if(r!=null){let g=this.base64encode(r);i["TLS.userbuf"]=g,s=this._hmacsha256(t,o,n,g)}else s=this._hmacsha256(t,o,n,null);i["TLS.sig"]=s;let u=JSON.stringify(i),d=qA.deflateSync(this.newBuffer(u)).toString("base64"),f=this.escape(d);return console.log("ret="+f),f}validate(t){let n=this.decode(t),r=qA.inflateSync(n);console.log("validate ret="+r)}}const ybe=604800;function _be(e){const{SDKAppID:t,secretKey:n,userID:r}=e,i=new vbe(t,n,ybe).genTestUserSig(r);return{SDKAppID:t,userSig:i}}const bbe=EY({components:[nY,kY,CY,VK,uK,IY]}),bg=_N.parse(location.search),a0=_N.parse(location.hash.split("?")[1]),Mbe=bg.Authorization||a0.Authorization||"";sessionStorage.setItem("Authorization",Mbe);sessionStorage.setItem("platform",bg.platform||a0.platform||"");const R3=bg.appId||a0.appId||1400799837,Ibe=bg.secretKey||a0.secretKey||"37bfb220843e25e78768cadd0dc06756e460e55bd631354930a4149565a1d0c9",VA=bg.userID,rw=AI.init({SDKAppID:R3});rw.use(D_e);rw.login({userID:VA,userSig:_be({SDKAppID:R3,secretKey:Ibe,userID:VA}).userSig});C7(cF).use(bbe).use(fF).use(rw).mount("#app");
|
|
|
+`);let s=PE.HmacSHA256(i,this.PRIVATEKEY);return PE.enc.Base64.stringify(s)}_utc(){return Math.round(Date.now()/1e3)}_isNumber(t){return t!==null&&(typeof t=="number"&&!isNaN(t-0)||typeof t=="object"&&t.constructor===Number)}_isString(t){return typeof t=="string"}genSigWithUserbuf(t,n,r){let o=this._utc(),i={"TLS.ver":"2.0","TLS.identifier":t,"TLS.sdkappid":this.SDKAPPID,"TLS.time":o,"TLS.expire":n},s="";if(r!=null){let g=this.base64encode(r);i["TLS.userbuf"]=g,s=this._hmacsha256(t,o,n,g)}else s=this._hmacsha256(t,o,n,null);i["TLS.sig"]=s;let u=JSON.stringify(i),d=qA.deflateSync(this.newBuffer(u)).toString("base64"),f=this.escape(d);return console.log("ret="+f),f}validate(t){let n=this.decode(t),r=qA.inflateSync(n);console.log("validate ret="+r)}}const ybe=604800;function _be(e){const{SDKAppID:t,secretKey:n,userID:r}=e,i=new vbe(t,n,ybe).genTestUserSig(r);return{SDKAppID:t,userSig:i}}const bbe=EY({components:[nY,kY,CY,VK,uK,IY]}),bg=_N.parse(location.search),a0=_N.parse(location.hash.split("?")[1]),Mbe=bg.Authorization||a0.Authorization||"";sessionStorage.setItem("Authorization",Mbe);sessionStorage.setItem("platform",bg.platform||a0.platform||"");const R3=bg.appId||a0.appId||1400805079,Ibe=bg.secretKey||a0.secretKey||"c5f4ea6140128a36c842990446a2c89249ab886b5e1ea6893555aa635a0b3c30",VA=bg.userID,rw=AI.init({SDKAppID:R3});rw.use(D_e);rw.login({userID:VA,userSig:_be({SDKAppID:R3,secretKey:Ibe,userID:VA}).userSig});C7(cF).use(bbe).use(fF).use(rw).mount("#app");
|