I'm trying to create a 100 byte ASCII string to send over a com port. Byte 99 in the string needs to be an 8-bit checksum. How do I set this byte? I've seen the java.util.zip package, but I'm not sure if that's just used for 'reading' a checksum or not. Any help is appreciated.
These days the term checksum doesn't have a meaning, in terms of an actual definition. In the past, it just means the sum of the values of all the bytes in the packet, ignoring overflows. These days, it just means a way to check -- and doesn't really imply that you are taking a sum.
It could be just a sum. It could be a CRC, of which there are tons of formulas. It could be a message digest -- MD5, SHA1, etc. It could be nearly anything. Now, admittedly, many that I listed are not 8-bit, so it may not be those.
Regardless, you need to look up, the actually definition of checksum -- used in your application, as it will be nearly impossible to guess what this thing you are communicating with, is expecting.