public class JceRandom extends AbstractRandom
Random implementation using the built-in SecureRandom PRNG.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
private java.security.SecureRandom |
random |
private byte[] |
tmp |
BY_NAME_COMPARATOR, NAME_EXTRACTOR| Constructor and Description |
|---|
JceRandom() |
| Modifier and Type | Method and Description |
|---|---|
void |
fill(byte[] foo,
int start,
int len)
Fill part of bytes with random values.
|
java.lang.String |
getName() |
int |
random(int n)
Returns a pseudo-random uniformly distributed
int
in the half-open range [0, n). |
toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindByName, getNameList, getNames, ofName, removeByNamepublic static final java.lang.String NAME
private byte[] tmp
private final java.security.SecureRandom random
public java.lang.String getName()
public void fill(byte[] foo,
int start,
int len)
Randomfoo - byte array to be filled.start - index to start filling at.len - length of segment to fill.public int random(int n)
Randomint
in the half-open range [0, n).n - The range upper limit