isaacCSPRNG
isaacCSPRNG copied to clipboard
What is the purpose of window.crypto.getRandomValues(d)?
(Ln 39), it does not look like this method is being used.
This line also prevents isaacCSPRNG from being run on NodeJS since the window.crypto
object is undefined.
Should it be removed?
Hey @r0hin, thanks for the question!
The logic on line 39 creates a default random seed in the event the user does not specify one. It is always invoked, but the result is not always used.
If you're looking to bring this into NodeJS, you'll find some tips here: https://stackoverflow.com/questions/25725596/use-window-crypto-in-nodejs-code
I understand! Thanks for the answer (and library).