Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jetpm
· 11y ago · 0 comments
I'm curious, why is Math.random() not OK? Does it have a bad seed?
Comments
[–]
mykii
11y ago
http://ifsec.blogspot.fr/2012/05/cross-domain-mathrandom-pre...
[–]
jetpm
OP
11y ago
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.
[–]
mykii
11y ago
except that nodejs generally uses crypto.randomBytes() and the Google V8 seems to have a strongest Math.random() but the approach is not clear