TIdHash32
Implements a class to calculate a 32-bit hash value based on string- or stream-based input values.
Unit
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.
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.
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.