Something wrong in the public cryptography class

01/24/2019 22:22 Apourtartt#1
Hello,

I am trying to make a simple bot that doesn't allow a lot of things to do. I am using C++ with Qt and the [Only registered and activated users can see links. Click Here To Register...] Cryless cryptography.
I have absolutly no knowledges in cryptography, and those lines doesn't seem to be written for understanding.
The problem is that everytime we send a packet, the first packet word is something like a "packet number" being increased by 1 every sent. As an example :
Code:
65533 say hello
65534 say how are you
65535 say it is nice now
65536 say but now it crashes because we exceeded 65535.
I tried to found a variable which has his max value to 65535, but there is not.
Maybe it comes from :
Code:
if(current_byte != 0x00)
				{
					if(i % 2 == 0)
					{
						output.push_back(current_byte << 4); // <-
					} else 
					{
						output.back() |= current_byte; 
					}
				}
?
65535 is still a 4 bits value meanwhile 65536 isn't. I tried everything I could, didn't succeed, maybe you got the solution ? (Or another C++ cryptography ?)

+ If someone is able to explain me how this class works, it would be really appreciated (courses or books could also works). Maybe I could understand where does those hexadecimals values come from...

Thank you in advance

Edit : how do you do to colorize the code area ?

Edit2 : just realised I wrote shit here : "65535 is still a 4 bits value meanwhile 65536 isn't. I tried everything I could, didn't succeed, maybe you got the solution ? (Or another C++ cryptography ?)"
I meant that 65535 is the 0xFFFF value, and 65536 is 0x10000 value.
01/24/2019 22:56 WalrossGreat#2
When the packet ID reaches 0xFFFF real client resets it back to 0
01/24/2019 23:04 Blowa#3
[Only registered and activated users can see links. Click Here To Register...]

It was also written here
01/24/2019 23:36 Apourtartt#4
Trying, brb.

Ok that works pretty well, thank you !