C++ software for a program which generates and checks CRC (Cyclic Redundancy Check) codes.
- Can work with any size CRC code up to 32 bits.
- Well commented source code, easy to extend.
- Not optimized for speed yet --- I'm working a table lookup method.
Ross Williams has description of various CRC implementations.
Download Source Code
testCRC.cpp contains the main program. crcCode.cpp and crcCode.h contains the CRC code top level implementation, while shiftRegister.cpp and shiftRegister.h implement the feedback shift register. View dataTypes.h contains the data types for the 32-bit parity bits and syndrome bits.
Install and Run
On Mac OS X, I use the Xcode IDE; on a Windows platforms, I use the GNU Cygwin toolset for command line compiling and debugging; and on Unix systems, including Mac OS X, I use the built-in gcc compiler and gdb debugger. For online C++ language tutorials, books and references, see links to C++ documentation.