mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-10 09:39:53 +03:00
29 lines
1.1 KiB
Java
29 lines
1.1 KiB
Java
package pro.gravit.launchserver.config;
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
import org.apache.logging.log4j.Logger;
|
|
import pro.gravit.utils.helper.SecurityHelper;
|
|
|
|
public class LaunchServerRuntimeConfig {
|
|
private transient final Logger logger = LogManager.getLogger();
|
|
public String passwordEncryptKey;
|
|
public String runtimeEncryptKey;
|
|
public String oemUnlockKey;
|
|
public String registerApiKey;
|
|
public String clientCheckSecret;
|
|
|
|
public void verify() {
|
|
if (passwordEncryptKey == null) logger.error("[RuntimeConfig] passwordEncryptKey must not be null");
|
|
if (clientCheckSecret == null) {
|
|
logger.warn("[RuntimeConfig] clientCheckSecret must not be null");
|
|
clientCheckSecret = SecurityHelper.randomStringToken();
|
|
}
|
|
}
|
|
|
|
public void reset() {
|
|
passwordEncryptKey = SecurityHelper.randomStringToken();
|
|
runtimeEncryptKey = SecurityHelper.randomStringAESKey();
|
|
registerApiKey = SecurityHelper.randomStringToken();
|
|
clientCheckSecret = SecurityHelper.randomStringToken();
|
|
}
|
|
}
|