Internet Direct (Indy)
Home
PreviousUpNext
TIdHashCRC16.HashValue@TStream

Implements calculation of the 16-bit CRC value for a block of data.

Parameters 
Description 
AStream 
Stream containing the data to be used for the CRC calculation. 

Word - 16-bit CRC value calculated from the input data.

HashValue is an overridden Word function in TIdHashCRC16 that implements calculation of the 16-bit CRC value for a block of data. HashValue reimplements the inherited method to use the pre-computed table of 16-bit CRC values for all 256 possible character combinations that can be represented in a byte from the input data. 

HashValue calculates the CRC result by performing an exclusive OR for the current CRC value and the precomputed CRC value in the table for low nibble of the current input data.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.