Hacker News new | ask | show | jobs
by jetpm 4002 days ago
I'm curious, why is Math.random() not OK? Does it have a bad seed?
1 comments

awesome and scary at the same time. awescary. If I understood it correctly this should work for nodejs servers as well, for example when they create random ids for users or urls.
except that nodejs generally uses crypto.randomBytes() and the Google V8 seems to have a strongest Math.random() but the approach is not clear