CHG: merged the forum user @jason 's fixes to LEGIC. *UNTESTED*

CHG: changed the CRC implementations.
This commit is contained in:
iceman1001 committed 2016-07-28 21:41:44 +02:00
1 parent 83dad64b91
commit 3e134b4c20
16 files changed
+1368 -163

No files matched your search

+1 -3
View File
@@ -74,9 +74,7 @@ const uint64_t crc64_table[] = {
void crc64 (const uint8_t *data, const size_t len, uint64_t *crc) {
for (size_t i = 0; i < len; i++)
{
//uint8_t tableIndex = (((uint8_t)(*crc >> 56)) ^ data[i]) & 0xff;
for (size_t i = 0; i < len; i++) {
uint8_t tableIndex = (((uint8_t)(*crc >> 56)) ^ data[i]) & 0xff;
*crc = crc64_table[tableIndex] ^ (*crc << 8);
}