public class SecureRandom
extends java.lang.Object
SecureRandom
Modifier and Type | Method and Description |
---|---|
static int |
getInt()
Get a random number
|
static int |
getInt(int n)
Returns a random number between 0 (inclusive) and the specified value
(exclusive).
|
static long |
getLong()
Get a random number
|
static void |
setSeed(byte[] rs)
Reseeds the underlying random object
|
static void |
setSeed(long rs)
Reseeds the underlying random object
|
public static void setSeed(long rs)
rs
- the seedpublic static void setSeed(byte[] rs)
rs
- the seedpublic static int getInt()
public static int getInt(int n)
n
- the bound on the random number. Must be positive.public static long getLong()