Dec-12-2023, 07:38 PM
You should post the C++ code so we know what it is supposed to do.
What type was the checksum variable in the C++ code? A lot of C checksum algorithms rely on overflow to limit the checksum to 8 bits or 16 bits or whatever. Python does not have fixed size integers, so you need to use modulo or arithmetic and operations to limit the size of the checksum.
What type was the checksum variable in the C++ code? A lot of C checksum algorithms rely on overflow to limit the checksum to 8 bits or 16 bits or whatever. Python does not have fixed size integers, so you need to use modulo or arithmetic and operations to limit the size of the checksum.