ReactOS 0.4.15-dev-7931-gfd331f1
crc32.c File Reference
#include <rtl.h>
#include <debug.h>
Include dependency graph for crc32.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

ULONG NTAPI RtlComputeCrc32 (IN ULONG Initial, IN PUCHAR Data, IN ULONG Length)
 

Variables

static const ULONG CrcTable [256]
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 20 of file crc32.c.

Function Documentation

◆ RtlComputeCrc32()

ULONG NTAPI RtlComputeCrc32 ( IN ULONG  Initial,
IN PUCHAR  Data,
IN ULONG  Length 
)

Definition at line 89 of file crc32.c.

92{
93 ULONG CrcValue = ~Initial;
94
95 DPRINT("(%u,%p,%u)\n", Initial, Data, Length);
96
97 while (Length > 0)
98 {
99 CrcValue = CrcTable[(CrcValue ^ *Data) & 0xff] ^ (CrcValue >> 8);
100 Data++;
101 Length--;
102 }
103 return ~CrcValue;
104}
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
static const ULONG CrcTable[256]
Definition: crc32.c:26
#define DPRINT
Definition: sndvol32.h:71
uint32_t ULONG
Definition: typedefs.h:59

Variable Documentation

◆ CrcTable

const ULONG CrcTable[256]
static

Definition at line 26 of file crc32.c.

Referenced by RtlComputeCrc32().