Sign in
apache
/
nifi-fds
/
954e729fbbf531ccabbbc6d1c1c2ea6135b371eb
/
.
/
node_modules
/
math-random
/
node.js
blob: da6783ebe9d049a68f58d94de55ad30f2b2ca928 [
file
] [
log
] [
blame
]
var
crypto
=
require
(
'crypto'
)
var
max
=
Math
.
pow
(
2
,
32
)
module
.
exports
=
random
module
.
exports
.
cryptographic
=
true
function
random
()
{
var
buf
=
crypto
.
randomBytes
(
4
)
.
toString
(
'hex'
)
return
parseInt
(
buf
,
16
)
/
max
}