public class ChaosRNG extends Object implements RandomnessSource
Constructor and Description |
---|
ChaosRNG()
Builds a ChaosRNG with a cryptographically-random seed.
|
Modifier and Type | Method and Description |
---|---|
RandomnessSource |
copy()
Produces another ChaosRNG with no relation to this one; this breaks the normal rules that RandomnessSource.copy
abides by because this class should never have its generated number sequence be predictable.
|
int |
next(int bits)
Using this method, any algorithm that might use the built-in Java Random
can interface with this randomness source.
|
long |
nextLong()
Can return any long, positive or negative, of any size permissible in a 64-bit signed integer.
|
void |
randomize()
Changes the internal state to a new, fully-random version that should have no relation to the previous state.
|
String |
toString() |
public ChaosRNG()
public int next(int bits)
RandomnessSource
next
in interface RandomnessSource
bits
- the number of bits to be returnedpublic long nextLong()
nextLong
in interface RandomnessSource
public RandomnessSource copy()
copy
in interface RandomnessSource
public void randomize()
Copyright © 2012–2016. All rights reserved.