{"ScriptPreparationCode":"function gen1() {\r\n return Math.random().toString(36).slice(2)\r\n}\r\n\r\nclass EntropyPool {\r\n #entropy;\r\n #index\r\n constructor(poolSize = 1024) {\r\n this.#entropy = new Uint32Array(poolSize)\r\n this.#index = 0\r\n crypto.getRandomValues(this.#entropy)\r\n }\r\n next() {\r\n const value = this.#entropy[this.#index\u002B\u002B]\r\n if (this.#index === this.#entropy.length) {\r\n crypto.getRandomValues(this.#entropy)\r\n this.#index = 0\r\n }\r\n return value\r\n }\r\n}\r\n\r\nconst pool = new EntropyPool()\r\n\r\nfunction random() {\r\n return pool.next() / 4294967295\r\n}\r\n\r\nconst lowercase = \u0027abcdefghijklmnopqrstuvwxyz\u0027;\r\nconst uppercase = \u0027ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0027;\r\nconst digits = \u00270123456789\u0027;\r\nconst charset = \u0060${lowercase}${uppercase}${digits}\u0060;\r\n\r\nfunction gen2() {\r\n let result = \u0027\u0027;\r\n for (let i = 0; i \u003C length; i\u002B\u002B) {\r\n const id = randomInt([0, charset.length - 1]);\r\n result \u002B= charset[id];\r\n }\r\n return result;\r\n}","TestCases":[{"Name":"Test gen1","Code":"gen1()","IsDeferred":false},{"Name":"Test gen2","Code":"gen2()","IsDeferred":false}]}