mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
(CzDecryptInt): don't modify source buffer.
This commit is contained in:
parent
7253c529e9
commit
72c885c49b
@ -81,11 +81,11 @@ namespace GameRes.Formats.KiriKiri
|
||||
|
||||
static int CzDecryptInt (byte[] data, int offset, byte key)
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
data[offset+i] ^= (byte)(key ^ CzHeaderKey[i]);
|
||||
}
|
||||
return data.ToInt32 (offset);
|
||||
int v = data[offset] ^ key ^ CzHeaderKey[0];
|
||||
v |= (data[offset+1] ^ key ^ CzHeaderKey[1]) << 8;
|
||||
v |= (data[offset+2] ^ key ^ CzHeaderKey[2]) << 16;
|
||||
v |= (data[offset+3] ^ key ^ CzHeaderKey[3]) << 24;
|
||||
return v;
|
||||
}
|
||||
|
||||
static byte[] CzDecryptData (byte[] data)
|
||||
|
Loading…
Reference in New Issue
Block a user