mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-06 05:38:48 +08:00
feat: support unencrypted LIBP archive
This commit is contained in:
@@ -150,7 +150,7 @@ namespace GameRes.Formats.Malie
|
||||
var header = new byte[0x10];
|
||||
foreach (var scheme in KnownSchemes.Values)
|
||||
{
|
||||
var decryptor = scheme.CreateDecryptor();
|
||||
var decryptor = file.View.AsciiEqual (0, "LIB") ? new NoOpDecryptor() : scheme.CreateDecryptor();
|
||||
ReadEncrypted (file.View, decryptor, 0, header, 0, 0x10);
|
||||
ILibIndexReader reader;
|
||||
if (Binary.AsciiEqual (header, 0, "LIBP"))
|
||||
|
||||
@@ -35,6 +35,13 @@ namespace GameRes.Formats.Malie
|
||||
void DecryptBlock (long block_offset, byte[] buffer, int index);
|
||||
}
|
||||
|
||||
public class NoOpDecryptor : IMalieDecryptor
|
||||
{
|
||||
public void DecryptBlock (long block_offset, byte[] buffer, int index)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class CamelliaDecryptor : IMalieDecryptor
|
||||
{
|
||||
Camellia m_enc;
|
||||
|
||||
Reference in New Issue
Block a user