Exemplo n.º 1
0
word compute_crc(word *tabel, unsigned char buffer[], unsigned char length) {
    unsigned char i;
    word acum;

    acum = 0;

    for(i = 0; i < length; i++)
        crctabel(buffer[i], &acum, tabel);

    return acum;
}
Exemplo n.º 2
0
/* Compute CRC checksum */
void compcrc(char *data, int len, word *acum) {
    *acum = 0;
    int i;
    for(i = 0; i < len; ++i)
        crctabel(data[i], acum, tabel);
}