MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / randomStr

Method randomStr

daily/dw.js:261–261  ·  view source on GitHub ↗
(length, charset)

Source from the content-addressed store, hash-verified

259 }
260 }
261 randomStr(length, charset) { var tmp1, tmp2, data = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), result = []; if (((charset = charset || data["length"]), length)) for (tmp1 = 0; tmp1 < length; tmp1++)result[tmp1] = data[0 | (Math.random() * charset)]; else for (result[8] = result[13] = result[18] = result[23] = "-", result[14] = "4", tmp1 = 0; tmp1 < 36; tmp1++)result[tmp1] || ((tmp2 = 0 | (16 * Math["random"]())), (result[tmp1] = data[19 === tmp1 ? (3 & tmp2) | 8 : tmp2])); return result["join"]("") }
262 decryptResponseBody(result, n) {
263 try {
264 const de1 = CryptoJS.enc.Hex.parse(result),

Callers 1

createEncryptedBodyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected