Skip to content

Commit

Permalink
safety
Browse files Browse the repository at this point in the history
  • Loading branch information
marcogarganigo authored Mar 8, 2023
1 parent 3dec7dc commit 901a002
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fastpass/fastpass.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Password Generator Library
var PasswordGenerator = (function () {

// Private variables and methods
Expand All @@ -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) {
Expand Down

0 comments on commit 901a002

Please sign in to comment.