Launcher/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerRuntimeConfig.java

26 lines
888 B
Java
Raw Normal View History

package pro.gravit.launchserver.config;
2019-04-12 00:58:45 +03:00
import pro.gravit.utils.helper.LogHelper;
import pro.gravit.utils.helper.SecurityHelper;
2019-04-12 00:58:45 +03:00
public class LaunchServerRuntimeConfig {
public String passwordEncryptKey;
public String oemUnlockKey;
public String registerApiKey;
public String clientCheckSecret;
2019-05-15 14:11:22 +03:00
public void verify() {
if (passwordEncryptKey == null) LogHelper.error("[RuntimeConfig] passwordEncryptKey must not be null");
2019-10-19 19:46:04 +03:00
if (clientCheckSecret == null) {
LogHelper.warning("[RuntimeConfig] clientCheckSecret must not be null");
clientCheckSecret = SecurityHelper.randomStringToken();
}
2019-04-12 00:58:45 +03:00
}
2019-05-15 14:11:22 +03:00
public void reset() {
passwordEncryptKey = SecurityHelper.randomStringToken();
registerApiKey = SecurityHelper.randomStringToken();
clientCheckSecret = SecurityHelper.randomStringToken();
2019-04-12 00:58:45 +03:00
}
}