fix:1、修复bug
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user