Indy 9
TIdHash128
Hierarchy, Methods, See Also, Unit: IdHash
Implements a class to calculate a 128-bit hash value based on string- or stream-based input values.
TIdHash128 = class(TIdHash)
Unit
IdHash
Description
TIdHash128 is a TIdHash descendant that implements calculation of a 128-bit hash value based on string- or stream-based input values. TIdHash128 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.

TIdHash128.AsHex
TIdHash128, See Also, Example
Converts the hash value to it's hexadecimal representation.
class function AsHex(const AValue: T4x4LongWordRecord): string;
Parameters
const AValue: T4x4LongWordRecord
The record containg LongWord values to converted to hex.
Return Value
String - Hexadecimal representation of the has value.
Description
AsHex is String class function that converts the hash value specified in AValue to it's hexadecimal representation. AsHex allocates a string with the length needed to represent the multiple LongWord values in AValue. AsHex allows uses of the method without an existing instance of the TIdHash128 class.

AsHex is used in TIdPOP3.Connect when the MD5 hash value is converted to hex for used in the APOP authentication mechanism.


TIdHash128.HashValue
TIdHash128, See Also
Implements calculation of a hash value for input data.
function HashValue(const ASrc: string): T4x4LongWordRecord; overload;
function HashValue(AStream: TStream): T4x4LongWordRecord; 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
T4x4LongWordRecord - 128-bit hash value for the input data.
Description
HashValue is an overloaded T4x4LongWordRecordfunction in TIdHash128 that specifies the mechanism used to calculate the 128-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 TIdHashMessageDigest, to support the specifics of the hashing algorithm. The string-based variant of HashValue relies on this implementation to calculate the hash value.


TIdHash128.HashValue
TIdHash128, See Also
Implements calculation of a hash value for input data.
function HashValue(const ASrc: string): T4x4LongWordRecord; overload;
function HashValue(AStream: TStream): T4x4LongWordRecord; 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
T4x4LongWordRecord - 128-bit hash value for the input data.
Description
HashValue is an overloaded T4x4LongWordRecordfunction in TIdHash128 that specifies the mechanism used to calculate the 128-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 TIdHashMessageDigest, 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.