* Random: Remove and deprecate some old classses
This commit is contained in:
@ -12,7 +12,7 @@ import net.i2p.crypto.CryptixAESEngine;
|
||||
import net.i2p.crypto.DSAEngine;
|
||||
import net.i2p.crypto.DummyDSAEngine;
|
||||
import net.i2p.crypto.DummyElGamalEngine;
|
||||
import net.i2p.crypto.DummyPooledRandomSource;
|
||||
//import net.i2p.crypto.DummyPooledRandomSource;
|
||||
import net.i2p.crypto.ElGamalAESEngine;
|
||||
import net.i2p.crypto.ElGamalEngine;
|
||||
import net.i2p.crypto.HMAC256Generator;
|
||||
@ -29,7 +29,7 @@ import net.i2p.util.FileUtil;
|
||||
import net.i2p.util.FortunaRandomSource;
|
||||
import net.i2p.util.KeyRing;
|
||||
import net.i2p.util.LogManager;
|
||||
import net.i2p.util.PooledRandomSource;
|
||||
//import net.i2p.util.PooledRandomSource;
|
||||
import net.i2p.util.RandomSource;
|
||||
|
||||
/**
|
||||
@ -729,12 +729,12 @@ public class I2PAppContext {
|
||||
private void initializeRandom() {
|
||||
synchronized (this) {
|
||||
if (_random == null) {
|
||||
if (true)
|
||||
//if (true)
|
||||
_random = new FortunaRandomSource(this);
|
||||
else if ("true".equals(getProperty("i2p.weakPRNG", "false")))
|
||||
_random = new DummyPooledRandomSource(this);
|
||||
else
|
||||
_random = new PooledRandomSource(this);
|
||||
//else if ("true".equals(getProperty("i2p.weakPRNG", "false")))
|
||||
// _random = new DummyPooledRandomSource(this);
|
||||
//else
|
||||
// _random = new PooledRandomSource(this);
|
||||
}
|
||||
_randomInitialized = true;
|
||||
}
|
||||
|
@ -17,6 +17,8 @@ import net.i2p.data.DataHelper;
|
||||
* (likely) small buffer to reduce the frequency of prng recalcs (though
|
||||
* the recalcs are now more time consuming).
|
||||
*
|
||||
* @deprecated Unused! See FortunaRandomSource
|
||||
*
|
||||
*/
|
||||
public class BufferedRandomSource extends RandomSource {
|
||||
private byte _buffer[];
|
||||
|
@ -15,6 +15,9 @@ import net.i2p.data.Base64;
|
||||
|
||||
/**
|
||||
* Maintain a set of PRNGs to feed the apps
|
||||
*
|
||||
* @deprecated Unused! See FortunaRandomSource
|
||||
*
|
||||
*/
|
||||
public class PooledRandomSource extends RandomSource {
|
||||
private Log _log;
|
||||
|
Reference in New Issue
Block a user