Random cleanup
This commit is contained in:
@ -204,6 +204,7 @@ public class BufferedRandomSource extends RandomSource {
|
||||
return super.nextGaussian();
|
||||
}
|
||||
|
||||
/*****
|
||||
public static void main(String args[]) {
|
||||
for (int i = 0; i < 16; i++)
|
||||
test();
|
||||
@ -232,4 +233,5 @@ public class BufferedRandomSource extends RandomSource {
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
*****/
|
||||
}
|
||||
|
@ -196,6 +196,7 @@ public class PooledRandomSource extends RandomSource {
|
||||
return prng.harvester();
|
||||
}
|
||||
|
||||
/*****
|
||||
public static void main(String args[]) {
|
||||
//PooledRandomSource prng = new PooledRandomSource(I2PAppContext.getGlobalContext());
|
||||
long start = System.currentTimeMillis();
|
||||
@ -214,4 +215,5 @@ public class PooledRandomSource extends RandomSource {
|
||||
System.out.println("Written to random.file: create took " + (created-start) + ", generate took " + (done-created));
|
||||
prng.saveSeed();
|
||||
}
|
||||
*****/
|
||||
}
|
||||
|
@ -72,46 +72,30 @@ public class RandomSource extends SecureRandom implements EntropyHarvester {
|
||||
/**
|
||||
* override as synchronized, for those JVMs that don't always pull via
|
||||
* nextBytes (cough ibm)
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean nextBoolean() { return super.nextBoolean(); }
|
||||
/**
|
||||
* override as synchronized, for those JVMs that don't always pull via
|
||||
* nextBytes (cough ibm)
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void nextBytes(byte buf[]) { super.nextBytes(buf); }
|
||||
/**
|
||||
* override as synchronized, for those JVMs that don't always pull via
|
||||
* nextBytes (cough ibm)
|
||||
*/
|
||||
|
||||
@Override
|
||||
public double nextDouble() { return super.nextDouble(); }
|
||||
/**
|
||||
* override as synchronized, for those JVMs that don't always pull via
|
||||
* nextBytes (cough ibm)
|
||||
*/
|
||||
|
||||
@Override
|
||||
public float nextFloat() { return super.nextFloat(); }
|
||||
/**
|
||||
* override as synchronized, for those JVMs that don't always pull via
|
||||
* nextBytes (cough ibm)
|
||||
*/
|
||||
|
||||
@Override
|
||||
public double nextGaussian() { return super.nextGaussian(); }
|
||||
/**
|
||||
* override as synchronized, for those JVMs that don't always pull via
|
||||
* nextBytes (cough ibm)
|
||||
*/
|
||||
|
||||
@Override
|
||||
public int nextInt() { return super.nextInt(); }
|
||||
/**
|
||||
* override as synchronized, for those JVMs that don't always pull via
|
||||
* nextBytes (cough ibm)
|
||||
*/
|
||||
|
||||
@Override
|
||||
public long nextLong() { return super.nextLong(); }
|
||||
|
||||
*****/
|
||||
|
||||
/** */
|
||||
public EntropyHarvester harvester() { return _entropyHarvester; }
|
||||
|
||||
public void feedEntropy(String source, long data, int bitoffset, int bits) {
|
||||
|
Reference in New Issue
Block a user