mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 16:34:56 +01:00
Build region_list and cur_region dynamically
This commit is contained in:
@@ -11,14 +11,18 @@ import static emu.grasscutter.Configuration.*;
|
||||
|
||||
public final class Crypto {
|
||||
private static final SecureRandom secureRandom = new SecureRandom();
|
||||
public static final long ENCRYPT_SEED = Long.parseUnsignedLong("11468049314633205968");
|
||||
public static byte[] ENCRYPT_SEED_BUFFER = new byte[0];
|
||||
|
||||
public static byte[] DISPATCH_KEY;
|
||||
public static byte[] DISPATCH_SEED;
|
||||
|
||||
public static byte[] ENCRYPT_KEY;
|
||||
public static long ENCRYPT_SEED = Long.parseUnsignedLong("11468049314633205968");
|
||||
public static byte[] ENCRYPT_SEED_BUFFER = new byte[0];
|
||||
|
||||
public static void loadKeys() {
|
||||
DISPATCH_KEY = FileUtils.read(KEYS_FOLDER + "/dispatchKey.bin");
|
||||
DISPATCH_SEED = FileUtils.read(KEYS_FOLDER + "/dispatchSeed.bin");
|
||||
|
||||
ENCRYPT_KEY = FileUtils.read(KEYS_FOLDER + "/secretKey.bin");
|
||||
ENCRYPT_SEED_BUFFER = FileUtils.read(KEYS_FOLDER + "/secretKeyBuffer.bin");
|
||||
}
|
||||
@@ -55,6 +59,6 @@ public final class Crypto {
|
||||
public static byte[] createSessionKey(int length) {
|
||||
byte[] bytes = new byte[length];
|
||||
secureRandom.nextBytes(bytes);
|
||||
return bytes;
|
||||
return bytes;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user