crc.c File Reference

Functions used to compute the 16- and 32-bit CRC of byte arrays. More...

#include "crc.h"

Functions

void updateCRC16 (unsigned short *crc, unsigned char data)
 file: CRC16.HPP
void updateCRC32 (unsigned long *crc, unsigned char data)
 file: CRC32.HPP

Variables

const unsigned short CRC16_table [256]
 file: CRC16.CPP
const unsigned long CRC32_table [256]
 file: CRC32.CPP


Detailed Description

Functions used to compute the 16- and 32-bit CRC of byte arrays.


Function Documentation

void updateCRC16 ( unsigned short *  ,
unsigned  char 
)

file: CRC16.HPP

CRC - Cyclic Redundancy Check (16-bit)

A CRC-checksum is used to be sure, the data hasn't changed or is false. To create a CRC-checksum, initialise a check-variable (unsigned short), and set this to zero. Than call for every byte in the file (e.g.) the procedure updateCRC16 with this check-variable as the first parameter, and the byte as the second. At the end, the check-variable contains the CRC-checksum.

implemented by Michael Neumann, 14.06.1998

References CRC16_table.

void updateCRC32 ( unsigned long *  ,
unsigned  char 
)

file: CRC32.HPP

CRC - Cyclic Redundancy Check (32-bit)

A CRC-checksum is used to be sure, the data hasn't changed or is false. To create a CRC-checksum, initialise a check-variable (unsigned short), and set this to zero. Than call for every byte in the file (e.g.) the procedure updateCRC32 with this check-variable as the first parameter, and the byte as the second. At the end, the check-variable contains the CRC-checksum.

implemented by Michael Neumann, 14.06.1998

References CRC32_table.


Variable Documentation

const unsigned short CRC16_table[256]

file: CRC16.CPP

CRC - Cyclic Redundancy Check (16-bit)

A CRC-checksum is used to be sure, the data hasn't changed or is false. To create a CRC-checksum, initialise a check-variable (unsigned short), and set this to zero. Than call for every byte in the file (e.g.) the procedure updateCRC16 with this check-variable as the first parameter, and the byte as the second. At the end, the check-variable contains the CRC-checksum.

implemented by Michael Neumann, 14.06.1998

Referenced by updateCRC16().

const unsigned long CRC32_table[256]

file: CRC32.CPP

CRC - Cyclic Redundancy Check (32-bit)

A CRC-checksum is used to be sure, the data hasn't changed or is false. To create a CRC-checksum, initialise a check-variable (unsigned long), and set this to zero. Than call for every byte in the file (e.g.) the procedure updateCRC32 with this check-variable as the first parameter, and the byte as the second. At the end, the check-variable contains the CRC-checksum.

implemented by Michael Neumann, 14.06.1998

Referenced by updateCRC32().


Generated on Mon Dec 19 12:34:13 2016 for OpenJPEG by  doxygen 1.5.6