Indy 9 | Content | Index | Reference

TIdHash32
Hierarchy, Methods, See Also, Unit: IdHash
Implements a class to calculate a 32-bit hash value based on string- or stream-based input values.

    TIdHash32 = class(TIdHash)

Unit
IdHash
Description
TIdHash32 is a TIdHash descendant that implements calculation of a 32-bit hash value based on string- or stream-based input values. TIdHash32 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.

TIdHash32.HashValue
TIdHash32, See Also
Implements calculation of a hash value for input data.

    function HashValue(const ASrc: string): LongWord; overload;
    function HashValue(AStream: TStream): LongWord; 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
LongWord - 32-bit hash value for the input data.
Description
HashValue is an overloaded LongWord function in TIdHash32 that specifies the mechanism used to calculate the 32-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 TIdHashCRC32, to support the specifics of the hashing algorithm. The string-based variant of HashValue relies on this implementation to calculate the hash value.

TIdHash32.HashValue
TIdHash32, See Also
Implements calculation of a hash value for input data.

    function HashValue(const ASrc: string): LongWord; overload;
    function HashValue(AStream: TStream): LongWord; 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
LongWord - 32-bit hash value for the input data.
Description
HashValue is an overloaded LongWord function in TIdHash32 that specifies the mechanism used to calculate the 32-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 TIdHashCRC32, 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.