Developer Center > Third Party Communication Protocols

Algorithm for XML Checksum?

(1/2) > >>

nikku:
Hey there!
I was reading through the documentation for the XML Communication protocol, and noticed that there must be a checksum for the payload included in the wrapper, but couldn't see how this checksum is calculated.
For instance, is it a CRC32 checksum? Or is it an 8-bit two's complement checksum like the touchscreen communication?
Thanks!

iostream212:
Hi! Welcome to the forums. Without testing I would guess two's compliment, but that is only a guess. I can't test it at the moment, but could probably work on it tonight or tomorrow and get an answer for you.

iostream212:
Well so much for testing... I was getting replies from the xml service no matter what I had as the checksum. Even empty and non-numeric checksum values worked.

nikku:
Thank you for the welcome! Admittedly I also did not test it yet, I was pseudo coding up a project and wondered what it was haha. Do you think I should code my project using 2's complement for now just to be safe? (i could likely easily change it later without much issue I imagine)
I'm also curious if the length will matter and what it's based on (length of the Bytes or length of the actual XML string), but I can probably figure that out pretty easily through some testing.
Thanks for your quick reply and help!

iostream212:
Sure thing! Length was the number of characters in the request string. Basically everything but the wrapper. Happy coding!

Sent from my Galaxy Nexus using Tapatalk 2

Navigation

[0] Message Index

[#] Next page

Go to full version