public class BouncyCastleRandom extends Object implements Random
Random
.
This pseudo random number generator uses the a very fast PRNG from BouncyCastle.
The JRE random will be used when creating a new generator to add some random
data to the seed.Modifier and Type | Class and Description |
---|---|
static class |
BouncyCastleRandom.Factory
Named factory for the BouncyCastle
Random |
Constructor and Description |
---|
BouncyCastleRandom() |
Modifier and Type | Method and Description |
---|---|
void |
fill(byte[] bytes,
int start,
int len)
Fill part of bytes with random values.
|
protected int |
next(int numBits) |
int |
random(int n)
Returns a pseudo-random uniformly distributed
int
in the half-open range [0, n). |
public void fill(byte[] bytes, int start, int len)
Random
public int random(int n)
int
in the half-open range [0, n).protected final int next(int numBits)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.