MCPcopy Create free account
hub / github.com/6dylan6/jdpro / _tk

Method _tk

function/magic.js:838–849  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

836 }
837
838 _tk() {
839 let id = function (n) {
840 let src = 'abcdefghijklmnopqrstuvwxyz1234567890', res = '';
841 for (let i = 0; i < n; i++) {
842 res += src[Math.floor(src.length * Math.random())];
843 }
844 return res;
845 }(40), ts = Date.now().toString(), tk = this.md5(
846 '' + decodeURIComponent(this.username) + ts + id
847 + 'tPOamqCuk9NLgVPAljUyIHcPRmKlVxDy');
848 return {ts: ts, id: id, tk: tk}
849 }
850
851 ua(type = 'jd') {
852 return JDAPP_USER_AGENTS[this.random(0, JDAPP_USER_AGENTS.length)]

Callers 1

buildMethod · 0.95

Calls 3

md5Method · 0.95
nowMethod · 0.80
randomMethod · 0.45

Tested by

no test coverage detected