Skip to content

Commit

Permalink
Change magic numbers to match the client exactly.
Browse files Browse the repository at this point in the history
Co-authored-by: dgelessus <[email protected]>
  • Loading branch information
Hoikas and dgelessus authored Aug 27, 2023
1 parent 0d7c79b commit a8cf3f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions streams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void DS::EncryptedStream::xteaDecipher(uint32_t* buf) const
for (size_t i = 0; i < 32; i++) {
second -= (((first >> 5) ^ (first << 4)) + first)
^ (m_key[(key >> 11) & 3] + key);
key += 0x61C88647;
key -= 0x9E3779B9;
first -= (((second >> 5) ^ (second << 4)) + second)
^ (m_key[key & 3] + key);
}
Expand All @@ -467,7 +467,7 @@ void DS::EncryptedStream::xteaEncipher(uint32_t* buf) const
for (size_t i = 0; i < 32; i++) {
first += (((second >> 5) ^ (second << 4)) + second)
^ (m_key[key & 3] + key);
key -= 0x61C88647;
key += 0x9E3779B9;
second += (((first >> 5) ^ (first << 4)) + first)
^ (m_key[(key >> 11) & 3] + key);
}
Expand Down

0 comments on commit a8cf3f4

Please sign in to comment.