This is probably mostly due to the fact that the end checksum is a 8-bit shifted ckB ORed with ckA, and so the value of ckA should almost certainly be less than 256. However unless you're dealing with potentially large binary strings, you could probably get away with performing the modulus calculation only on ckA.