CRC-4

CRC-4 if you ever need it:

byte crc4(void *data, int size) // CRC-4-ITU
{
byte r = 0, *p = (byte*)data, *end = p + size;
    while(p < end)
{
r ^= *p++;
        till(8){ int t = ~((r&1) - 1); r = (r>>1) ^ (0xC & t); }
}

return r;
}