From: Roland Haeder Date: Mon, 11 Apr 2016 19:12:45 +0000 (+0200) Subject: Use more secure RNG than Math.random() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=67695e82f5362ead9425aa48881e70a30cb639a8;p=juser-login-core.git Use more secure RNG than Math.random() --- diff --git a/src/org/mxchange/jusercore/model/user/UserUtils.java b/src/org/mxchange/jusercore/model/user/UserUtils.java index e7a299d..b21a217 100644 --- a/src/org/mxchange/jusercore/model/user/UserUtils.java +++ b/src/org/mxchange/jusercore/model/user/UserUtils.java @@ -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);