Topic Path: Symbol Reference > Classes > TIdStack Class > TIdStack Methods > CalcCheckSum Method
ContentsIndexHome
PreviousUpNext
TIdStack.CalcCheckSum Method

Calculate the CRC for values for the specified data.

function CalcCheckSum(
    const AData: TIdBytes
): word; virtual;
Parameters 
Description 
AData 
Data to use when calculating the CRC value. 

Word - CRC value for the specified data.

CalcCheckSum is a Word function used to calculate the CRC for values passed in the AData parameter. 

CalcCheckSum calls the BytesToWord routine in IdGlobal.pas to convert the bytes in AData to Word data types used when calculating the CRC value. 

CalcCheckSum is used in protocol clients where CRC values are used to ensure the validity of data packets transmitted using a specific protocol. 

Use WriteChecksum to write a CRC value to the socket.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.