Indy 9
TIdHash16
Hierarchy, Methods, See Also, Unit: IdHash
Implements a class to calculate a 16-bit hash value based on string- or stream-based input values.
TIdHash16 = class(TIdHash)
Unit
IdHash
Description
TIdHash16 is a TIdHash descendant that implements calculation of a 16-bit hash value based on string- or stream-based input values. TIdHash16 is a base class that specifies an abstract virtual method for calculating the hash value for the input data from a stream. Applications should create instances of a descendant class that implements the abstract methods.

TIdHash16.HashValue
TIdHash16, See Also
Implements calculation of a hash value for input data.
function HashValue(const ASrc: string): Word; overload;
function HashValue(AStream: TStream): Word; virtual; abstract; overload;
Parameters
const ASrc: string
String containing data used to calculate the hash value.
AStream: TStream
Stream containing data used to calculate the hash value.
Return Value
Word - 16-bit hash value for the input data.
Description
HashValue is an overloaded Word function in TIdHash16 that specifies the mechanism used to calculate the 16-bit hash value for the input data.

The stream-based variant of HashValue is an abstract virtual function that must be reimplemented in a descendant class, like TIdHashCRC16, to support the specifics of the hashing algorithm. The string-based variant of HashValue relies on this implementation to calculate the hash value.


TIdHash16.HashValue
TIdHash16, See Also
Implements calculation of a hash value for input data.
function HashValue(const ASrc: string): Word; overload;
function HashValue(AStream: TStream): Word; virtual; abstract; overload;
Parameters
const ASrc: string
String containing data used to calculate the hash value.
AStream: TStream
Stream containing data used to calculate the hash value.
Return Value
Word - 16-bit hash value for the input data.
Description
HashValue is an overloaded Word function in TIdHash16 that specifies the mechanism used to calculate the 16-bit hash value for the input data.

The stream-based variant of HashValue is an abstract virtual function that must be reimplemented in a descendant class, like TIdHashCRC16, to support the specifics of the hashing algorithm. The string-based variant of HashValue relies on this implementation to calculate the hash value.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.