This commit is contained in:
Shikhar Bhushan
2011-09-07 21:24:49 +01:00
parent 4b2f42804e
commit 0937ec9800
2 changed files with 2 additions and 7 deletions

View File

@@ -58,10 +58,9 @@ public class BouncyCastleRandom
}
private final RandomGenerator random;
private final RandomGenerator random = new VMPCRandomGenerator();
public BouncyCastleRandom() {
random = new VMPCRandomGenerator();
byte[] seed = new SecureRandom().generateSeed(8);
random.addSeedMaterial(seed);
}

View File

@@ -58,11 +58,7 @@ public class JCERandom
}
private byte[] tmp = new byte[16];
private SecureRandom random = null;
public JCERandom() {
random = new SecureRandom();
}
private final SecureRandom random = new SecureRandom();
/**
* Fill the given byte-array with random bytes from this PRNG.