Decompile fn_18105 (myGPack::PakCipher::BuildRoundKeys)
Batch #18020 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_18105 myGPack::PakCipher::BuildRoundKeys: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, Yommy, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
552b90bd13
commit
f674d40994
1 changed files with 2 additions and 1 deletions
|
|
@ -180,6 +180,7 @@ namespace myGPack {
|
|||
|
||||
std::memset(this->m_roundKeys[round], 0, sizeof(this->m_roundKeys[round]));
|
||||
|
||||
unsigned bitsPerGroup = 6;
|
||||
for (unsigned i = 0; i < 48; ++i) {
|
||||
std::uint8_t bit = s_keyCompression[i] - 1;
|
||||
unsigned byte;
|
||||
|
|
@ -191,7 +192,7 @@ namespace myGPack {
|
|||
}
|
||||
|
||||
if (halves[byte] & s_bitMasks[bit & 7]) {
|
||||
this->m_roundKeys[round][i / 6] |= s_bitMasks[i % 6];
|
||||
this->m_roundKeys[round][i / bitsPerGroup] |= s_bitMasks[i % bitsPerGroup];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue