You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to replicate the exact output of Math.random(), is this correct? real(0, 1, false)(engine);
I'm replacing Math.random() with the above because I want the output to be unpredictable, as I've seen that its possible, given a sample of outputs of Math.random(), a user can determine what the next outputs will be. I was wondering if you could confirm, for my sanity, that using this library will prevent that? I'm using nodeCrypto as an engine.
The text was updated successfully, but these errors were encountered:
1. I want to replicate the exact output of Math.random(), is this correct? `real(0, 1, false)(engine);`
2. I'm replacing Math.random() with the above because I want the output to be unpredictable, as I've seen that its possible, given a sample of outputs of Math.random(), a user can determine what the next outputs will be. I was wondering if you could confirm, for my sanity, that using this library will prevent that? I'm using `nodeCrypto` as an engine.
@gc I had a think on that and yeah, to a degree that will help with that problem, but no RNG engine is truly random. A truly random RNG engine would never have that issue at all, yet any of the crypto rng engines are designed to have it as little as possible.
And yeah, that's exactly how Math.random() works, you got that perfectly
Kind of 2 quick questions:
real(0, 1, false)(engine);
nodeCrypto
as an engine.The text was updated successfully, but these errors were encountered: