public class DummyRandomSource extends RandomSource
Constructor and Description |
---|
DummyRandomSource() |
DummyRandomSource(long seed) |
Modifier and Type | Method and Description |
---|---|
int |
acceptEntropy(EntropySource source,
long data,
int entropyGuess)
Accepts entropy data from a source
|
int |
acceptEntropyBytes(EntropySource myPacketDataSource,
byte[] buf,
int offset,
int length,
double bias)
Accepts larger amounts of entropy data from a source, with a bias
|
int |
acceptTimerEntropy(EntropySource timer)
Accepts entropy in the form of timing data from a source
|
int |
acceptTimerEntropy(EntropySource fnpTimingSource,
double bias)
Accept entropy from a source with a bias
|
void |
close()
If the RandomSource has any resources it wants to close, it can
do so when this method is called
|
next, nextFullDouble, nextFullFloat, waitForEntropy
public DummyRandomSource()
public DummyRandomSource(long seed)
public int acceptEntropy(EntropySource source, long data, int entropyGuess)
RandomSource
acceptEntropy
in class RandomSource
public int acceptTimerEntropy(EntropySource timer)
RandomSource
acceptTimerEntropy
in class RandomSource
public int acceptTimerEntropy(EntropySource fnpTimingSource, double bias)
RandomSource
acceptTimerEntropy
in class RandomSource
bias
- Value by which we multiply the entropy before counting it.
Must be <= 1.0.public int acceptEntropyBytes(EntropySource myPacketDataSource, byte[] buf, int offset, int length, double bias)
RandomSource
acceptEntropyBytes
in class RandomSource
myPacketDataSource
- The source from which the data has come.buf
- The buffer to read bytes from.offset
- The offset to start reading from.length
- The number of bytes to read.bias
- The bias. Value by which we multiply the entropy before counting it.
Must be <= 1.0.public void close()
RandomSource
close
in class RandomSource