Subversion Repositories SvarDOS

Rev

Rev 1959 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1959 Rev 1975
Line 12... Line 12...
12
 */
12
 */
13
 
13
 
14
#ifndef CRC32_H_SENTINEL
14
#ifndef CRC32_H_SENTINEL
15
#define CRC32_H_SENTINEL
15
#define CRC32_H_SENTINEL
16
 
16
 
17
/* instead of calling crc32_init() you can just assign this value */
17
/* always initialize your crc32 with this value before any computation */
18
#define CRC32_INITVAL (0xFFFFFFFFlu)
18
#define CRC32_INITVAL (0xFFFFFFFFlu)
19
 
19
 
20
unsigned long crc32_init(void);
-
 
21
 
-
 
22
/* This computes a 32 bit CRC of the data in the buffer, and returns the
20
/* This computes a 32 bit CRC of the data in the buffer, and returns the
23
   CRC.  The polynomial used is 0xedb88320. */
21
   CRC.  The polynomial used is 0xedb88320. */
24
void crc32_feed(unsigned long *crc32val, const unsigned char *buf, unsigned int len);
22
void crc32_feed(unsigned long *crc32val, const unsigned char *buf, unsigned int len);
25
 
23
 
26
void crc32_finish(unsigned long *crc32val);
24
void crc32_finish(unsigned long *crc32val);