Dataflow Runtime API  3.1.1.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
imt::base::core::util::MD5 Class Reference

This class provides the MD5 checksum calculation routines. More...

#include <Imt.Base.Core.Util/MD5.h>

Public Member Functions

 MD5 (void)
 Constructor. More...
 
virtual ~MD5 (void)
 Destructor. More...
 
void update (const uint8_t pData[], const uint32_t dataSize)
 Block update operation. More...
 
void finalize (uint8_t digest[MD5_HASH_SIZE])
 Finalization ends the md5 message-digest operation, writing the the message digest and zeroizing the context. More...
 

Static Public Member Functions

static bool areEqual (const uint8_t expected[MD5_HASH_SIZE], const uint8_t current[MD5_HASH_SIZE])
 Compares two MD5 hashes and returns true if they are equal. More...
 
static void resetMd5Hash (uint8_t md5Hash[MD5_HASH_SIZE])
 Resets the MD5 hash array. More...
 

Static Public Attributes

static const uint32_t MD5_HASH_SIZE = 16U
 Defines the size of an md5 hash. More...
 

Detailed Description

This class provides the MD5 checksum calculation routines.

Constructor & Destructor Documentation

◆ MD5()

imt::base::core::util::MD5::MD5 ( void  )
explicit

Constructor.

Creates a MD5 hash calculation instance

◆ ~MD5()

virtual imt::base::core::util::MD5::~MD5 ( void  )
virtual

Destructor.

Member Function Documentation

◆ areEqual()

static bool imt::base::core::util::MD5::areEqual ( const uint8_t  expected[MD5_HASH_SIZE],
const uint8_t  current[MD5_HASH_SIZE] 
)
static

Compares two MD5 hashes and returns true if they are equal.

Parameters
expectedThe expected checksum.
currentThe current checksum.
Returns
True if the given MD5 hashes are equal.

◆ finalize()

void imt::base::core::util::MD5::finalize ( uint8_t  digest[MD5_HASH_SIZE])

Finalization ends the md5 message-digest operation, writing the the message digest and zeroizing the context.

Parameters
digestThis is an OUT parameter which contains the created hash after the method returns.

◆ resetMd5Hash()

static void imt::base::core::util::MD5::resetMd5Hash ( uint8_t  md5Hash[MD5_HASH_SIZE])
static

Resets the MD5 hash array.

Parameters
md5HashMD5 hash to be reset.

◆ update()

void imt::base::core::util::MD5::update ( const uint8_t  pData[],
const uint32_t  dataSize 
)

Block update operation.

Continues an md5 message-digest operation, processing another message block, and updating the internal calculation context.

Parameters
pDataThe data to write into the context
dataSizeThe size of the input data

Member Data Documentation

◆ MD5_HASH_SIZE

const uint32_t imt::base::core::util::MD5::MD5_HASH_SIZE = 16U
static

Defines the size of an md5 hash.


The documentation for this class was generated from the following file: