crc64: fix error

This commit is contained in:
Paul A. Patience
2016-06-10 11:41:11 -04:00
parent 275f8988f8
commit 5cfffbfa62
2 changed files with 29 additions and 8 deletions
+22
View File
@@ -43,6 +43,28 @@
#include <sys/types.h>
#include <stdint.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/*
* CRC64_CHECK is the CRC64 of the string "123456789" without the null byte.
*
* const uint8_t checkbuf[] =
* {
* '1', '2', '3', '4', '5', '6', '7', '8', '9'
* };
*
* assert(crc64(checkbuf, sizeof(checkbuf)) == CRC64_CHECK);
*/
/* CRC-64/WE */
#define CRC64_POLY ((uint64_t)0x42f0e1eba9ea3693)
#define CRC64_INIT ((uint64_t)0xffffffffffffffff)
#define CRC64_XOROUT ((uint64_t)0xffffffffffffffff)
#define CRC64_CHECK ((uint64_t)0x62ec59e3f1a4f00a)
/****************************************************************************
* Public Function Prototypes
****************************************************************************/