Hi,
I want to create a function which will tell if me the last packet i got from the server is identical to the one i got now.
I thought about put in an array and just compare the two but it will be very inefficient.
So, a checksum or a signature implementation will ( i think ...) do the work.
But how do i make a checksum for let say a const char * data type?
Any help will be thankful!
Create a Signature or checksum
Started by shiranraviv, Feb 19 2010 12:46 AM
3 replies to this topic
#1
Posted 19 February 2010 - 12:46 AM
|
|
|
#2
Posted 19 February 2010 - 07:30 AM
A simple checksum is just a sum. Bytes are bytes; add them.
#3
Posted 19 February 2010 - 09:03 AM
Well, there are actually quite a lot of ways to ensure proper communication. You gotta decide what's good enough for you, maybe a simple sum will be fine. Should probably start by reading this: Checksum - Wikipedia, the free encyclopedia
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#4
Posted 19 February 2010 - 09:59 AM
I'm kind of confused - if you're talking about packet integrity - TCP does that for you.


Sign In
Create Account

Back to top









