Topic Path: Symbol Reference > Classes > TIdHash128 Class > TIdHash128 Methods > AsHex Method
ContentsIndexHome
PreviousUpNext
TIdHash128.AsHex Method

Converts the hash value to it's hexadecimal representation.

class function AsHex(
    const AValue: T4x4LongWordRecord
): string;
Parameters 
Description 
AValue 
The record containg LongWord values to converted to hex. 

String - Hexadecimal representation of the hash value.

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.

sHex := TIdHash128.AsHex(HashValue(sUsername + sPassword));
sAPOPDigest := Lowercase(sHex);
Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.