diff --git a/engine/src/main/java/com/arcadedb/query/sql/function/math/SQLFunctionRandomInt.java b/engine/src/main/java/com/arcadedb/query/sql/function/math/SQLFunctionRandomInt.java index 2522fad2b6..e0bb9dcf6b 100644 --- a/engine/src/main/java/com/arcadedb/query/sql/function/math/SQLFunctionRandomInt.java +++ b/engine/src/main/java/com/arcadedb/query/sql/function/math/SQLFunctionRandomInt.java @@ -23,7 +23,7 @@ import com.arcadedb.query.sql.executor.CommandContext; import com.arcadedb.query.sql.function.SQLFunctionAbstract; -import java.util.*; +import java.security.SecureRandom; /** * Generates a random number integer between 0 and the number passed as parameter. @@ -47,7 +47,7 @@ public Object execute(final Object iThis, final Identifiable iCurrentRecord, fin int bound = iParams[0] instanceof Number ? ((Number) iParams[0]).intValue() : Integer.parseInt(iParams[0].toString()); - return new Random().nextInt(bound); + return new SecureRandom().nextInt(bound); } @Override