diff options
-rw-r--r-- | bin/crc32.c | 19 | ||||
-rw-r--r-- | bin/crc32.h | 14 |
2 files changed, 0 insertions, 33 deletions
diff --git a/bin/crc32.c b/bin/crc32.c deleted file mode 100644 index ac3eab8..0000000 --- a/bin/crc32.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Ripped from the linux kernel crc32 code - * - * This source code is licensed under the GNU General Public License, - * Version 2. - */ - -#include "crc32.h" - -u32 crc32_le(u32 crc, unsigned char const *p, size_t len) -{ - int i; - while (len--) { - crc ^= *p++; - for (i = 0; i < 8; i++) - crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0); - } - return crc; -} - diff --git a/bin/crc32.h b/bin/crc32.h deleted file mode 100644 index d2a65fe..0000000 --- a/bin/crc32.h +++ /dev/null @@ -1,14 +0,0 @@ -/* Ripped from the linux kernel crc32 code - * - * This source code is licensed under the GNU General Public License, - * Version 2. - */ -#include <stdint.h> -#include <stddef.h> - -typedef uint32_t u32; - -extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); -#define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)data, length) -#define CRCPOLY_LE 0xedb88320 - |