Last active
November 27, 2019 08:25
-
-
Save mfcodeworks/b366234e33363e33467a956886498c09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const secureMathRandom = () => { | |
// Divide a random UInt32 by the maximum value (2^32 -1) to get a result between 0 and 1 | |
return window.crypto.getRandomValues(new Uint32Array(1))[0] / 4294967295; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment