This commit is contained in:
@@ -143,12 +143,7 @@ public final class Utility {
|
|||||||
* @return SecureRandom
|
* @return SecureRandom
|
||||||
*/
|
*/
|
||||||
public static SecureRandom createRandom() {
|
public static SecureRandom createRandom() {
|
||||||
SecureRandom random;
|
SecureRandom random = new SecureRandom();
|
||||||
try {
|
|
||||||
random = SecureRandom.getInstance("SHA1PRNG");
|
|
||||||
} catch (Exception e) {
|
|
||||||
random = new SecureRandom();
|
|
||||||
}
|
|
||||||
byte[] bs = new byte[16];
|
byte[] bs = new byte[16];
|
||||||
random.nextBytes(bs);
|
random.nextBytes(bs);
|
||||||
random.setSeed(bs);
|
random.setSeed(bs);
|
||||||
|
|||||||
Reference in New Issue
Block a user