feat: UniqueConst에 숨겨진 hiddenSeed 생성

- 이후 RNG에 사용
This commit is contained in:
2022-05-13 23:45:14 +09:00
parent 1a9010ac06
commit 6d335284ee
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -5,6 +5,7 @@ class UniqueConst{
public static $serverID = '_tK_serverID_';
public static $serverName = '_tK_serverName_';
public static $seasonIdx = '_tK_seasonIdx_';
public static $hiddenSeed = '_tK_hiddenSeed_';
private function __construct(){}
+3
View File
@@ -93,12 +93,15 @@ class ResetHelper{
$gameStor->resetCache();
}
$hiddenSeed = bin2hex(random_bytes(16));//32byte, 128bit random seed
$result = Util::generateFileUsingSimpleTemplate(
$servRoot.'/d_setting/UniqueConst.orig.php',
$servRoot.'/d_setting/UniqueConst.php',[
'serverID'=>$serverID,
'serverName'=>ServConfig::getServerList()[$prefix]->getKorName(),
'seasonIdx'=>$seasonIdx,
'hiddenSeed'=>$hiddenSeed,
], true
);