-
Notifications
You must be signed in to change notification settings - Fork 1
/
crc.h
42 lines (33 loc) · 1.01 KB
/
crc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**********************************************************************
*
* Filename: crc.h
*
* Description: A header file describing the various CRC standards.
*
* Notes:
*
*
* Copyright (c) 2000 by Michael Barr. This software is placed into
* the public domain and may be used for any purpose. However, this
* notice must not be changed or removed and no warranty is either
* expressed or implied by its publication or distribution.
**********************************************************************/
#ifndef _crc_h
#define _crc_h
#include <Windows.h>
#ifndef FALSE
#define FALSE 0
#define TRUE !FALSE
#endif
typedef BYTE crc;
#define CRC_NAME "CRC-CCITT"
#define POLYNOMIAL 0x107
#define INITIAL_REMAINDER 0x00
#define FINAL_XOR_VALUE 0x00
#define REFLECT_DATA FALSE
#define REFLECT_REMAINDER FALSE
#define CHECK_VALUE 0xF4
void crcInit(void);
crc crcSlow(unsigned char const message[], int nBytes);
crc crcFast(unsigned char const message[], int nBytes);
#endif /* _crc_h */