]> git.mxchange.org Git - juser-core.git/commitdiff
Use more secure RNG than Math.random()
authorRoland Haeder <roland@mxchange.org>
Mon, 11 Apr 2016 19:12:45 +0000 (21:12 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 11 Apr 2016 19:12:45 +0000 (21:12 +0200)
src/org/mxchange/jusercore/model/user/UserUtils.java

index e7a299dd93087100f20ff3012e62fad501171de9..b21a217388b6b541fa52c0daa06c96530eb07a15 100644 (file)
@@ -107,7 +107,7 @@ public class UserUtils extends BaseFrameworkSystem {
                }
 
                // Generate large number
-               String number = Long.toString(Math.round(Math.random() * 10_000_000_000L));
+               String number = Long.toString(RANDOM_NUMBER_GENERATOR.nextLong() * 10_000_000_000L);
 
                // Generate salt
                String salt = Crypt.crypt(number);