crypto: fix randomInt range check
The current implementation allows crypto.randomInt(0)
and returns NaN
.
Refs: https://github.com/nodejs/node/pull/34600
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines