public final class ExtendedSecureRandom extends Object
A Specialized random number generator for MessageVortex.
Constructor and Description |
---|
ExtendedSecureRandom() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
generateSeed(int i)
Returns the given number of seed bytes, computed using the seed generation algorithm
that this class uses to seed itself.
|
static SecureRandom |
getSecureRandom()
Returns an internal representation of the secure Random number generator.
|
static void |
nextBytes(byte[] array)
An array filled with random byte values.
|
static double |
nextDouble()
Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from
this random number generator's sequence.
|
static double |
nextGauss()
Returns a gaussian distributed value between 0 and 1 (maximum at 0.5).
|
static int |
nextInt(int bound)
Returns an integer between 0 and bound-1.
|
static int |
nextInt(int low,
int up)
Returns an integer between low and up-1.
|
static double |
nextRandomTime(long start,
long peak,
long end)
Returns a random time.
|
public static int nextInt(int bound)
Returns an integer between 0 and bound-1.
bound
- the maximum value to be usedpublic static int nextInt(int low, int up)
Returns an integer between low and up-1.
low
- the minimum value to be returnedup
- the maximum value to be usedIllegalArgumentException
- if low >= uppublic static void nextBytes(byte[] array)
An array filled with random byte values.
array
- the array to be filledpublic static byte[] generateSeed(int i)
Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself.
i
- the number of bytes to be generatedpublic static double nextDouble()
Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.
public static SecureRandom getSecureRandom()
Returns an internal representation of the secure Random number generator.
public static double nextGauss()
Returns a gaussian distributed value between 0 and 1 (maximum at 0.5).
public static double nextRandomTime(long start, long peak, long end)
Returns a random time.
start
- the earliest allowed timepeak
- the peak time (50% chance)end
- the latest timeCopyright © 2023. All rights reserved.