diff --git a/Loader/src/main/java/org/baseband/launcher/launch/Loader.java b/Loader/src/main/java/org/baseband/launcher/launch/Loader.java index 38ec300..3e2e5b3 100644 --- a/Loader/src/main/java/org/baseband/launcher/launch/Loader.java +++ b/Loader/src/main/java/org/baseband/launcher/launch/Loader.java @@ -319,11 +319,7 @@ public class Loader { private static String getRandomTicket() { - StringBuilder buffer = new StringBuilder(); - for (int count = 0; count < 10; ++count) { - buffer.append(UUID.randomUUID()); - } - return buffer.toString(); + return Tools.randomAlphanumericString(1024); } diff --git a/Loader/src/main/java/org/baseband/launcher/util/Key.java b/Loader/src/main/java/org/baseband/launcher/util/Key.java index 3075dec..f068d62 100644 --- a/Loader/src/main/java/org/baseband/launcher/util/Key.java +++ b/Loader/src/main/java/org/baseband/launcher/util/Key.java @@ -9,12 +9,14 @@ package org.baseband.launcher.util; import java.nio.charset.StandardCharsets; import java.util.UUID; +import de.tudbut.tools.Tools; + public class Key { - private String string; + private final String string; public Key() { - set(); + string = Tools.randomAlphanumericString(4096); } public Key(String key) { @@ -26,14 +28,6 @@ public class Key { } - private void set() { - StringBuilder buffer = new StringBuilder(); - for (int count = 0; count < 128; ++count) { - buffer.append(UUID.randomUUID()); - } - string = buffer.toString(); - } - public byte[] encryptByte(byte[] bytes) { if(bytes == null) { return null;