2012-08-04 05:23:29 -07:00
|
|
|
/* Copyright (C) 2012 Connor Olding
|
|
|
|
*
|
|
|
|
* This program is licensed under the terms of the MIT License, and
|
|
|
|
* is distributed without any warranty. You should have received a
|
|
|
|
* copy of the license along with this program; see the file LICENSE.
|
|
|
|
*/
|
2012-04-13 02:43:39 -07:00
|
|
|
|
2012-08-05 19:58:43 -07:00
|
|
|
enum { CRC_TABLE_SIZE = 0x100 };
|
2012-04-13 02:43:39 -07:00
|
|
|
|
2012-08-05 19:58:43 -07:00
|
|
|
void crc_fill_table(ulong *table, int big, ulong polynomial);
|
|
|
|
void crc_be_cycle(ulong *table, ulong *remainder, char c);
|
|
|
|
void crc_le_cycle(ulong *table, ulong *remainder, char c);
|
2012-04-13 22:20:39 -07:00
|
|
|
ulong crc_reflect(ulong input);
|