fix:1、修复bug

This commit is contained in:
2026-05-27 09:32:33 +08:00
parent 5f68fe42c1
commit d4f6b82209
27 changed files with 388 additions and 379 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ namespace RedHotRoast
// 解密文件:从 src 读出,解密后写到 dst
public static void DecryptFile(string src, string dst)
{
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
var key = ConfigSystem.GetConfigResVersion();
var data = File.ReadAllBytes(src);
// 检查魔法字节
if (data.Length < Magic.Length || !data.Take(Magic.Length).SequenceEqual(Magic)) throw new InvalidDataException("文件未加密或格式错误");
@@ -42,7 +42,7 @@ namespace RedHotRoast
{
var data = File.ReadAllBytes(src);
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
var key = ConfigSystem.GetConfigResVersion();
// 检查魔法字节
if (data.Length < Magic.Length || !data.Take(Magic.Length).SequenceEqual(Magic))
@@ -66,7 +66,7 @@ namespace RedHotRoast
public static byte[] DecryptVideoToBytes(string src)
{
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
var key = ConfigSystem.GetConfigResVersion();
var data = File.ReadAllBytes(src);
if (data.Length < Magic.Length || !data.Take(Magic.Length).SequenceEqual(Magic))