use a less archaic random thing

This commit is contained in:
Daniella / Tove 2023-09-30 02:49:46 +02:00
parent 3e670caa4d
commit fcf320bc00
Signed by: TudbuT
GPG key ID: 7D63D5634B7C417F
2 changed files with 5 additions and 15 deletions

View file

@ -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);
}

View file

@ -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;