mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
(KiriKiri): implemented Natsupochi encryption.
This commit is contained in:
parent
bfc1d4e5ee
commit
8bdde818c9
@ -1171,4 +1171,27 @@ NextEntry:
|
||||
Decrypt (entry, offset, values, pos, count);
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class NatsupochiCrypt : ICrypt
|
||||
{
|
||||
public override byte Decrypt (Xp3Entry entry, long offset, byte value)
|
||||
{
|
||||
return (byte)(value ^ (entry.Hash >> 3));
|
||||
}
|
||||
|
||||
public override void Decrypt (Xp3Entry entry, long offset, byte[] values, int pos, int count)
|
||||
{
|
||||
byte key = (byte)(entry.Hash >> 3);
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
values[pos+i] ^= key;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Encrypt (Xp3Entry entry, long offset, byte[] values, int pos, int count)
|
||||
{
|
||||
Decrypt (entry, offset, values, pos, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -170,6 +170,8 @@ Hanafubuki ~Sennen no Koi o Shimashita~<br/>
|
||||
Haruiro ☆ Communication ♪<br/>
|
||||
Hime to Majin to Koi Suru Tamashii<br/>
|
||||
Imouto Style<br/>
|
||||
Natsupochi<br/>
|
||||
Nidaime wa ☆ Mahou Shoujo<br/>
|
||||
Nuki Doki!<br/>
|
||||
Okiba ga Nai!<br/>
|
||||
Ore no Saimin Fantasia<br/>
|
||||
|
Loading…
Reference in New Issue
Block a user