![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Hobbyist Programmer
|
Sumchecks
I'm looking for more information about this statement:
Quote:
Thanks |
|
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: Sumchecks
Generally speaking, you will sum or sum-without-carry (xor) the bytes then negate or invert the sum and tack it on the end. The reason for the negation or inversion is that when you re-sum the whole thing, including the sum, the result will be zero if there are no errors.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
|
Re: Sumchecks
That sounds pretty straight forward. Thank you for the information. An error would typically mean that a byte is missing or has been tampered with correct? Also if there was seeding in this sumcheck, what would that do to the overall sum?
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: Sumchecks
The seed would vary the checksum, so you'd need to know the seed to recover. There's a lot of literature on this for beyond-simple implementations.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|