Contents 

SlavaSoft FastCRC Library Online Help

Prev Page Next Page
FastCRC Library C++ Interface

CFastCRC16C

CFastCRC16C class does not have a base class.

CFastCRC16C class assists you in generating CRC16C checksums.

CRC16C checksums can be generated in two modes: accumulative and non-accumulative.

The accumulative mode is applied when the data for which the checksum is calculated (data) represents one or more continuous memory block(s) or when the data is created at runtime in many steps (for instance, when reading a file).

Non-accumulative mode can be applied when the data represents one continuous memory block, a null-terminated string, or a file.

To generate the checksum in the accumulative mode, perform the following:

  • Instantiate a CFastCRC16C object.

  • Call the Update member function for each continuous memory block of data to perform the calculations.

  • Call the Final member function to obtain the checksum.

To generate the checksum in the non-accumulative mode, perform the following:

  • Call the Calculate static member function to calculate and retrieve the checksum.

#include <FastCRC.h>

using namespace FastCRC;

 

Class Members   |   Useful Links   |   HashCalc

 

Samples   CRC16C checksum generation for a file

               CRC16C checksum generation for a string


 

 

Send Feedback to SlavaSoft Inc. Tell a friend about FastCRC Library