ADTF  3.18.2
cMD5Checksum

Class for computing MD5 sums. More...

Public Member Functions

 cMD5Checksum ()
 Constructor.
 
virtual ~cMD5Checksum ()
 Destructor.
 
tResult Update (const tUInt8 *pData, tUInt32 nSize)
 Adds new data that should be processed. More...
 
tResult Digest (cString &strDigest)
 Finalizes the computation. More...
 
tResult Digest (tUInt8 *pDigest)
 Finalizes the computation. More...
 

Static Public Member Functions

static tResult CalcFile (const cFilename &strFile, cString &strDigest)
 Utility function to calculate the MD5 digest of an existing file. More...
 
static tResult CalcFile (const cFilename &strFile, tUInt8 *pDigest)
 Utility function to calculate the MD5 digest of an existing file. More...
 
static tResult CalcString (const cString &strInput, cString &strDigest)
 Utility function to calculate the MD5 digest of a string. More...
 
static tResult CalcString (const cString &strInput, tUInt8 *pDigest)
 Utility function to calculate the MD5 digest of a string. More...
 

Detailed Description

Class for computing MD5 sums.

Definition at line 17 of file checksum.h.

Member Function Documentation

◆ CalcFile() [1/2]

static tResult CalcFile ( const cFilename strFile,
cString strDigest 
)
static

Utility function to calculate the MD5 digest of an existing file.

Parameters
strFile[in] The file that the digest should be calculated of.
strDigest[out] This string wil lbe updated with the hex representation of the 16 byte digest.
Returns
Standard result.

◆ CalcFile() [2/2]

static tResult CalcFile ( const cFilename strFile,
tUInt8 pDigest 
)
static

Utility function to calculate the MD5 digest of an existing file.

Parameters
strFile[in] The file that the digest should be calculated of.
pDigest[out] A pointer to a 16 byte array that will be filled with the digest.
Returns
Standard result.

◆ CalcString() [1/2]

static tResult CalcString ( const cString strInput,
cString strDigest 
)
static

Utility function to calculate the MD5 digest of a string.

Parameters
strInput[in] The string that the digest should be calculated of.
strDigest[out] This string wil lbe updated with the hex representation of the 16 byte digest.
Returns
Standard result.

◆ CalcString() [2/2]

static tResult CalcString ( const cString strInput,
tUInt8 pDigest 
)
static

Utility function to calculate the MD5 digest of a string.

Parameters
strInput[in] The string that the digest should be calculated of.
pDigest[out] A pointer to a 16 byte array that will be filled with the digest.
Returns
Standard result.

◆ Digest() [1/2]

tResult Digest ( cString strDigest)

Finalizes the computation.

Parameters
strDigest[out] This string will be updated with the hex representation of the 16 byte digest.
Returns
Standard result.

◆ Digest() [2/2]

tResult Digest ( tUInt8 pDigest)

Finalizes the computation.

Parameters
pDigest[out] A pointer to a 16 byte array that will be filled with the digest.
Returns
Standard result.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ Update()

tResult Update ( const tUInt8 pData,
tUInt32  nSize 
)

Adds new data that should be processed.

Parameters
pData[in] The data.
nSize[in] The size of the data.
Return values
ERR_INVALID_STATEThe digest has already been finalized by calling one of the Digest methods.
This method is real-time safe.\nSee @ref page_real_time_safe.\n