Here you can find the source of crc8PushByte(int[] crc, byte add)
private static void crc8PushByte(int[] crc, byte add)
//package com.java2s; public class Main { private static void crc8PushByte(int[] crc, byte add) { int addInt = (add & 0x000000FF); crc[0] = crc[0] ^ addInt;/* www .ja va2 s.c o m*/ for (int i = 0; i < 8; i++) { if ((crc[0] & 0x00000001) != 0x00000000) { crc[0] = (crc[0] >> 1) ^ 0x0000008C; } else { crc[0] = (crc[0] >> 1); } } } }