This commit is contained in:
Redkale
2018-05-17 19:42:34 +08:00
parent 8f598fe4eb
commit 8176ec1b0a

View File

@@ -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);