From 901a002939c325bdb3f197c17e15120080c9af14 Mon Sep 17 00:00:00 2001 From: marcogarganigo <110045452+marcogarganigo@users.noreply.github.com> Date: Wed, 8 Mar 2023 08:23:53 +0100 Subject: [PATCH] safety --- fastpass/fastpass.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fastpass/fastpass.js b/fastpass/fastpass.js index 0ef9228..50244df 100644 --- a/fastpass/fastpass.js +++ b/fastpass/fastpass.js @@ -1,4 +1,3 @@ -// Password Generator Library var PasswordGenerator = (function () { // Private variables and methods @@ -10,7 +9,7 @@ var PasswordGenerator = (function () { }; function getRandomInt(min, max) { - return Math.floor(Math.random() * (max - min + 1)) + min; + return window.crypto.getRandomValues(new Uint32Array(1))[0] % (max - min + 1) + min; } function generateRandomString(length, charset) {