public interface Random
The library used an object (or in fact, multiple ones in different places) implementing this interface to generate random numbers. These are used for several purposes:
The library will choose the implementation class by the configuration
option random
, and instantiate it using the no-argument
constructor.
The library includes a default implementation, based on a
new SecureRandom()
.
An application might implement this interface to provide an alternative random number generator, maybe based on some hardware device.
Modifier and Type | Method and Description |
---|---|
void |
fill(byte[] foo,
int start,
int len)
Fills a segment of a byte array with random bits.
|
void fill(byte[] foo, int start, int len)
foo
- the array to put the random data into.start
- the position in the array from where on the random data
should be put.len
- the length of the segment to be filled with random data,
in bytes. There will be 8 * len
random bits generated.This is a simplified version of the inofficial Javadoc created by PaĆlo Ebermann. Have a look at the official homepage.