From b570d4469303b6ab0f2116cadc5dfc8561d3fa5e Mon Sep 17 00:00:00 2001 From: "pixeebot[bot]" <23113631+pixeebot@users.noreply.github.com> Date: Sat, 30 Dec 2023 13:30:43 +0000 Subject: [PATCH] Introduced protections against predictable RNG abuse --- Psyho.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Psyho.java b/Psyho.java index 9ed990a..c71825f 100644 --- a/Psyho.java +++ b/Psyho.java @@ -5,6 +5,7 @@ import java.io.BufferedReader; import java.io.InputStreamReader; +import java.security.SecureRandom; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -48,7 +49,7 @@ public class Psyho { private static long time_passed = 0; private static class RNG { - Random random = new Random(); + Random random = new SecureRandom(); public int rand() {