mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 15:44:00 +08:00
(KiriKiri): another encryption.
This commit is contained in:
parent
bf708ca1b1
commit
ebd08887d1
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using GameRes.Utility;
|
using GameRes.Utility;
|
||||||
|
|
||||||
@ -897,4 +898,60 @@ namespace GameRes.Formats.KiriKiri
|
|||||||
Decrypt (entry, offset, data, pos, count);
|
Decrypt (entry, offset, data, pos, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class SenrenCxCrypt : CxEncryption
|
||||||
|
{
|
||||||
|
public string FileMapName { get; set; }
|
||||||
|
|
||||||
|
public SenrenCxCrypt (CxScheme scheme) : base (scheme)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Init (ArcFile arc)
|
||||||
|
{
|
||||||
|
if (null == KnownNames)
|
||||||
|
ReadNames();
|
||||||
|
foreach (var entry in arc.Dir)
|
||||||
|
{
|
||||||
|
string name;
|
||||||
|
if (KnownNames.TryGetValue (entry.Name, out name))
|
||||||
|
{
|
||||||
|
entry.Name = name;
|
||||||
|
entry.Type = FormatCatalog.Instance.GetTypeFromName (name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReadNames ()
|
||||||
|
{
|
||||||
|
var dir = FormatCatalog.Instance.DataDirectory;
|
||||||
|
var names_file = Path.Combine (dir, FileMapName);
|
||||||
|
var names = new Dictionary<string, string>();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var hash_buf = new char[32];
|
||||||
|
using (var reader = new StreamReader (names_file))
|
||||||
|
{
|
||||||
|
while (32 == reader.Read (hash_buf, 0, 32))
|
||||||
|
{
|
||||||
|
if (',' != reader.Read())
|
||||||
|
break;
|
||||||
|
var name = reader.ReadLine();
|
||||||
|
if (null == name)
|
||||||
|
break;
|
||||||
|
names[new string (hash_buf)] = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception X)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Trace.WriteLine (X.Message, "[SenrenCxCrypt]");
|
||||||
|
}
|
||||||
|
KnownNames = names;
|
||||||
|
}
|
||||||
|
|
||||||
|
[NonSerialized]
|
||||||
|
Dictionary<string, string> KnownNames = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -301,7 +301,9 @@ Rakugaki Overheart<br/>
|
|||||||
RGH ~Koi to Hero to Gakuen to~<br/>
|
RGH ~Koi to Hero to Gakuen to~<br/>
|
||||||
Riding Incubus<br/>
|
Riding Incubus<br/>
|
||||||
Rui wa Tomo o Yobu<br/>
|
Rui wa Tomo o Yobu<br/>
|
||||||
|
Sanoba Witch<br/>
|
||||||
Seirei Tenshou<br/>
|
Seirei Tenshou<br/>
|
||||||
|
Senren*Banka<br/>
|
||||||
Se-kirara<br/>
|
Se-kirara<br/>
|
||||||
Sharin no Kuni, Himawari no Shoujo<br/>
|
Sharin no Kuni, Himawari no Shoujo<br/>
|
||||||
Shokusai no Miyako<br/>
|
Shokusai no Miyako<br/>
|
||||||
|
Loading…
Reference in New Issue
Block a user