I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit df3fc6e0 authored by zzz's avatar zzz
Browse files

Random cleanup

parent fe575a38
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment