crc32file(3)

NAME
crc32file - apply the standard CRC-32 hash function to a stream

SYNTAX
#include <crc32file.h> void crc32file_clear(m);
void crc32file_add(m,c);
void crc32file_addn(m,b,len);
void crc32file_hash(m,h); crc32file *m;
unsigned char c;
unsigned char h[CRC32FILE_HASHLEN];
unsigned char *b;
int len;

DESCRIPTION
crc32file applies the standard CRC-32 hash function to a stream of unsigned characters. m points to an crc32file structure, which accumulates the hash as data is fed in. Before feeding in any data you must call crc32file_clear(m). Then, for each unsigned character c from the stream, call crc32file_add(m,c). To process an array b of len unsigned characters, call crc32file_addn(m,b,len). This is faster than calling crc32file_add on each character in turn. crc32file_hash(m,h) places the resulting hash into h, an array of bytes of length CRC32FILE_HASHLEN. You may not use m after that without again calling crc32file_clear(m). CRC32FILE_HASHLEN equals 4.

COMPATIBILITY
The crc32file library was designed for compatibility with BSD 4.4 cksum.

DEFINITION
See the POSIX specification for cksum.

VERSION
crc32file 0.95, 8 July 1993.

AUTHOR
Interface by Daniel J. Bernstein to code written by Gary S. Brown.

SEE ALSO
cksum(1)