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

23 lines
856 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");
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
}
}