[*] Increase IPCHandle checksum bitlength
This commit is contained in:
parent
e24c35d2d0
commit
ec4b47c15d
@ -105,12 +105,17 @@ namespace Aurora::IO::IPC
|
||||
}
|
||||
|
||||
AuUInt32 magic {0x811c9dc5};
|
||||
for (int i = 0; i < in.size() - 1; i++)
|
||||
for (int i = 0; i < in.size() - 2; i++)
|
||||
{
|
||||
magic ^= (in[i] * 0x01000193);
|
||||
}
|
||||
|
||||
if (AuUInt8(AuUInt8(in[in.size() - 1] - 'A') & 15) != AuUInt8(magic & 15))
|
||||
if (AuUInt8(AuUInt8(in[in.size() - 2] - 'A') & 15) != AuUInt8(magic & 15))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (AuUInt8(AuUInt8(in[in.size() - 1] - 'A') & 15) != AuUInt8((magic >> 4) & 15))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -292,6 +297,7 @@ namespace Aurora::IO::IPC
|
||||
}
|
||||
|
||||
ret.push_back(((magic & 15) + 'A'));
|
||||
ret.push_back((((magic >> 4) & 15) + 'A'));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user