File: hashops.c

package info (click to toggle)
hcxtools 6.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,080 kB
  • sloc: ansic: 19,601; python: 144; sh: 99; makefile: 98
file content (15 lines) | stat: -rw-r--r-- 398 bytes parent folder | download | duplicates (5)
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;
}
/*===========================================================================*/