fix(TDI-42192): Use SecureRandom in system routines (#2707)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package routines.system;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
|
||||
public class RandomUtils {
|
||||
|
||||
//lazy init, but no meaning now as only one method
|
||||
private static final class RandomNumberGeneratorHolder {
|
||||
static final SecureRandom randomNumberGenerator = new SecureRandom();
|
||||
}
|
||||
|
||||
public static double random() {
|
||||
return RandomNumberGeneratorHolder.randomNumberGenerator.nextDouble();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user