♻️ 更新 salt

This commit is contained in:
BTMuli
2023-10-05 15:43:32 +08:00
parent ce2ff5b6f5
commit e974f30647
4 changed files with 24 additions and 39 deletions

View File

@@ -1,12 +1,10 @@
/**
* @file web constant TGConstant.ts
* @description 常量
* @author BTMuli <bt-muli@outlook.com>
* @since Beta v0.3.0
* @since Beta v0.3.3
*/
import { BBS_VERSION, BBS_HEADER_AGENT, BBS_APP_ID } from "./bbs";
import SALT from "./salt";
import { BBS_VERSION, BBS_HEADER_AGENT, BBS_APP_ID, BBS_SALT } from "./bbs";
import SERVER from "./server";
import { GAME_BIZ } from "./utils";
@@ -16,7 +14,7 @@ const TGConstant = {
USER_AGENT: BBS_HEADER_AGENT,
APP_ID: BBS_APP_ID,
},
Salt: SALT,
Salt: BBS_SALT,
Server: SERVER,
Utils: {
GAME_BIZ,

View File

@@ -1,10 +1,22 @@
/**
* @file web constant bbs.ts
* @description 常量-应用数据
* @author BTMuli <bt-muli@outlook.com>
* @since Beta v0.3.0
* @since Beta v0.3.3
*/
export const BBS_VERSION = "2.50.1";
export const BBS_VERSION = "2.59.1";
export const BBS_HEADER_AGENT = `Mozilla/5.0 (Windows NT 10.0; Win64; x64) miHoYoBBS/${BBS_VERSION}`;
export const BBS_APP_ID = "bll8iq97cem8";
/**
* @description salt 值
* @version 2.59.1
* @since Beta v0.3.3
*/
export const BBS_SALT = {
K2: "awFeNNTsLYcK20LSO60Es8CRVZOjCB1b",
LK2: "6pNd5NnDnbwKxewrPwEoWlSYwhualS2H",
X4: "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs",
X6: "t0qEgfub6cvueAPgR5m9aQWWVciEer7v",
PROD: "t0qEgfub6cvueAPgR5m9aQWWVciEer7v",
};

View File

@@ -1,25 +0,0 @@
/**
* @file web constant salt.ts
* @description 用到的 salt 值
* @author BTMuli<bt-muli@outlook.com>
* @since Alpha v0.2.0
*/
/**
* @description salt 值
* @version 2.50.1
* @since Alpha v0.2.0
*/
const SALT = {
BBS: {
K2: "A4lPYtN0KGRVwE5M5Fm0DqQiC5VVMVM3",
LK2: "kkFiNdhyHqZ1VnDRHnU1podIvO4eiHcs",
},
Other: {
X4: "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs",
X6: "t0qEgfub6cvueAPgR5m9aQWWVciEer7v",
prod: "JwYDpKvLj6MrMqqYU6jTKF17KNO2PXoS",
},
};
export default SALT;

View File

@@ -10,21 +10,21 @@ import { transCookie, transParams } from "./tools";
/**
* @description 获取 salt
* @since Beta v0.3.0
* @version 2.50.1
* @since Beta v0.3.3
* @version 2.59.1
* @param {string} saltType salt 类型
* @returns {string} salt
*/
function getSalt(saltType: string): string {
switch (saltType) {
case "common":
return TGConstant.Salt.Other.X4;
return TGConstant.Salt.X4;
case "prod":
return TGConstant.Salt.Other.prod;
return TGConstant.Salt.PROD;
case "lk2":
return TGConstant.Salt.BBS.LK2;
return TGConstant.Salt.LK2;
default:
return TGConstant.Salt.Other.X4;
return TGConstant.Salt.X4;
}
}