use a less archaic random thing
This commit is contained in:
parent
3e670caa4d
commit
fcf320bc00
2 changed files with 5 additions and 15 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue