From a5a849c0598566744b5e08724a5ff849c88b9636 Mon Sep 17 00:00:00 2001 From: Tim203 Date: Thu, 1 Apr 2021 00:57:47 +0200 Subject: [PATCH] Use a better name to indicate Windows --- .../main/java/org/geysermc/floodgate/crypto/AesKeyProducer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/org/geysermc/floodgate/crypto/AesKeyProducer.java b/common/src/main/java/org/geysermc/floodgate/crypto/AesKeyProducer.java index bb2be89f8..59080c195 100644 --- a/common/src/main/java/org/geysermc/floodgate/crypto/AesKeyProducer.java +++ b/common/src/main/java/org/geysermc/floodgate/crypto/AesKeyProducer.java @@ -59,7 +59,7 @@ public final class AesKeyProducer implements KeyProducer { private SecureRandom getSecureRandom() throws NoSuchAlgorithmException { // use Windows-PRNG for windows (default impl is SHA1PRNG) // default impl for unix-like systems is NativePRNG. - if (System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("win")) { + if (System.getProperty("os.name").startsWith("Windows")) { return SecureRandom.getInstance("Windows-PRNG"); } else { return new SecureRandom();