|The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....|
|Home BasePack DStruct Procedures and Functions CRC16ofBuffer|
|See also: CRC32ofBuffer, CalcNextCRC16, TCRC16Mode|
The function CRC16ofBuffer calculates a 16-bit CRC of the byte array Buffer; the algorithm is based on the following polynomial:
The parameter Numdata specifies the number of bytes contained in the buffer. All NumData bytes in the buffer are processed and the cyclic redundancy code is returned by the function. The parameter CRC16Mode determines which type of CRC-16 should be calculated: crcZModem creates a CRC as used in ZModem, crcCCITT creates a CRC according to the standard of CCITT. Please note that the only difference between these two CRCs is the initialization.