1#ifndef CRC32_P_H_
2#define CRC32_P_H_
3
4#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */
5
6
7static inline uint32_t gf2_matrix_times(const uint32_t *mat, uint32_t vec) {
8 uint32_t sum = 0;
9 while (vec) {
10 if (vec & 1)
11 sum ^= *mat;
12 vec >>= 1;
13 mat++;
14 }
15 return sum;
16}
17
18
19#endif /* CRC32_P_H_ */
20