From 95b4f81235e45b214eb2d1ec97e2ab5649e828e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Sun, 15 Jan 2023 01:07:31 +0100 Subject: [PATCH] Switch to SecureRandom class --- src/main/java/wtf/beatrice/hidekobot/Cache.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/wtf/beatrice/hidekobot/Cache.java b/src/main/java/wtf/beatrice/hidekobot/Cache.java index 09954e0..dec6f1e 100644 --- a/src/main/java/wtf/beatrice/hidekobot/Cache.java +++ b/src/main/java/wtf/beatrice/hidekobot/Cache.java @@ -13,6 +13,7 @@ import wtf.beatrice.hidekobot.util.Logger; import java.awt.*; import java.lang.reflect.Field; +import java.security.SecureRandom; import java.time.LocalDateTime; import java.util.HashMap; import java.util.Random; @@ -29,7 +30,7 @@ public class Cache // the Random instance that we should always use when looking for an RNG based thing. // the seed is updated periodically. - private static final Random randomInstance = new Random(); + private static final SecureRandom randomInstance = new SecureRandom(); // map to store results of "love calculator", to avoid people re-running the same command until // they get what they wanted.