This commit is contained in:
Redkale
2018-05-17 17:46:32 +08:00
parent 4dbd6b57f8
commit 2fac5c853e

View File

@@ -143,7 +143,12 @@ public final class Utility {
* @return SecureRandom
*/
public static SecureRandom createRandom() {
SecureRandom random = new SecureRandom();
SecureRandom random;
try {
random = SecureRandom.getInstance("SHA1PRNG");
} catch (Exception e) {
random = new SecureRandom();
}
byte[] bs = new byte[32];
random.nextBytes(bs);
random.setSeed(bs);