mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-22 15:22:39 +00:00
Random: Don't bother trying to seed from /dev/urandom on Windows
This commit is contained in:
1 parent
9cdd0fc829
commit
a4f75d7b32
1 file changed
+2
-1
@@ -201,7 +201,8 @@ public class RandomSource extends SecureRandom implements EntropyHarvester {
|
||||
} catch (InterruptedException ie) {}
|
||||
|
||||
// why urandom? because /dev/random blocks
|
||||
ok = seedFromFile(new File("/dev/urandom"), buf) || ok;
|
||||
if (!SystemVersion.isWindows())
|
||||
ok = seedFromFile(new File("/dev/urandom"), buf) || ok;
|
||||
// we merge (XOR) in the data from /dev/urandom with our own seedfile
|
||||
File localFile = new File(_context.getConfigDir(), SEEDFILE);
|
||||
ok = seedFromFile(localFile, buf) || ok;
|
||||
|
||||
Reference in new issue
Block a user