genRandomInt function

int genRandomInt()

Generates a random integer using a cryptographically secure random number generator.

The generated integer is a combination of two 32-bit random numbers, providing a wider range of values.

Implementation

int genRandomInt() =>
    (_random.nextInt(_maxRandomNumber) << 32) |
    _random.nextInt(_maxRandomNumber);