File: hashops.c

package info (click to toggle)
hcxtools 7.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,152 kB
  • sloc: ansic: 21,223; python: 144; makefile: 101; sh: 99
file content (15 lines) | stat: -rw-r--r-- 398 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "hashops.h"

/*===========================================================================*/
uint32_t fcscrc32check(const uint8_t *buffer, uint32_t bufferlen)
{
uint32_t crc = 0xFFFFFFFF;
uint32_t p;

for(p = 0; p < bufferlen; ++p)
	{
	crc = crc32table[(crc ^buffer[p]) & 0xff] ^(crc >> 8);
	}
return ~crc;
}
/*===========================================================================*/