Topic Path: Symbol Reference > Classes > TIdHash160 Class > TIdHash160 Methods > HashValue Method > HashValue Method (string)
TIdHash160.HashValue Method (string)

Calculates a 160-bit hash value for input data.

function HashValue(
    const ASrc: string
): T5x4LongWordRecord; overload;
String containing input data for the hash value calculation. 

T5x4LongWordRecord - 160-Bit hash value for the calculation.

HashValue is an overloaded class method used to calculate a 160-bit hash value from input data provided in parameters to the method. 

HashValue creates a TIdStream instance used to write the value in ASrc, and calls the overloaded Stream method. 

As a class method, HashValue does not require an existing instance of TIdHash160 to perform the hash value calculation. 

The stream-based variant of HasHValue is an abstract virtual method, and must be overridden in a descendant class that implements the specifics of a hashing algorithm (like TIdHashSHA1).



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