105 |
|
private static final AtomicLong seeder = new AtomicLong(initialSeed()); |
106 |
|
|
107 |
|
private static long initialSeed() { |
108 |
< |
String pp = java.security.AccessController.doPrivileged( |
109 |
< |
new sun.security.action.GetPropertyAction( |
110 |
< |
"java.util.secureRandomSeed")); |
111 |
< |
if (pp != null && pp.equalsIgnoreCase("true")) { |
108 |
> |
java.security.PrivilegedAction<Boolean> action = |
109 |
> |
() -> Boolean.getBoolean("java.util.secureRandomSeed"); |
110 |
> |
if (java.security.AccessController.doPrivileged(action)) { |
111 |
|
byte[] seedBytes = java.security.SecureRandom.getSeed(8); |
112 |
< |
long s = (long)(seedBytes[0]) & 0xffL; |
112 |
> |
long s = (long)seedBytes[0] & 0xffL; |
113 |
|
for (int i = 1; i < 8; ++i) |
114 |
< |
s = (s << 8) | ((long)(seedBytes[i]) & 0xffL); |
114 |
> |
s = (s << 8) | ((long)seedBytes[i] & 0xffL); |
115 |
|
return s; |
116 |
|
} |
117 |
|
return (mix64(System.currentTimeMillis()) ^ |