static uint32_t update_crc()

in Sources/crc32iso3309.c [108:116]


static uint32_t update_crc(uint32_t crc, const uint8_t *buf, size_t len)
{
    uint32_t c = crc ^ 0xffFFffFFU;

    for (size_t n = 0; n < len; ++n) {
        c = crc_table[(c ^ buf[n]) & 0xFF] ^ (c >> 8);
    }
    return c ^ 0xffFFffFFU;
}