replaced use of new SecureRandom()
import java.io.IOException;
import java.security.SecureRandom;
+import org.bouncycastle.crypto.CryptoServicesRegistrar;
import org.bouncycastle.util.Arrays;
/**
/**
* Default constructor that takes an arbitrary SecureRandom as initial random
*/
- public JournalingSecureRandom() {
-
- this(new SecureRandom());
-
+ public JournalingSecureRandom()
+ {
+ this(CryptoServicesRegistrar.getSecureRandom());
}
/**
@@ -115,7 +115,8 @@ public void clear()
/**
* Resets the index to zero such that the randomness will now be reused
*/
- public void reset() {
+ public void reset()
+ {
index = 0;
