fix:修复bug(解密文件夹名字修改)

This commit is contained in:
barry
2026-05-20 09:38:24 +08:00
parent d1ed0d5747
commit aca0e4d1af
7 changed files with 23823 additions and 23676 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ namespace RedHotRoast
// 解密文件:从 src 读出,解密后写到 dst
public static void DecryptFile(string src, string dst)
{
var key = ConfigSystem.GetCommonConf().ResVersion;
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
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.GetCommonConf().ResVersion;
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
// 检查魔法字节
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.GetCommonConf().ResVersion;
var key = ConfigSystem.IsOrganic() ? ConfigSystem.GetCommonConf().ResVersion : ConfigSystem.GetCommonConf().ResVersion1;
var data = File.ReadAllBytes(src);
if (data.Length < Magic.Length || !data.Take(Magic.Length).SequenceEqual(Magic))