Md4Transform Class Reference

#include <md4transform.h>

List of all members.


Detailed Description

Md4Transform class handles data md4 checksumming functionality.

The entire implementation is hidden within this class's implementation file's static functions, and only this interface is provided to users. To use this class, instantiate Md4Transform object (either on stack or heap), and pass data to overloaded SumUp functions. You can call SumUp function as many times as you want, the data will be accomulated. When you are done passing data, call GetHash() function ONCE to retrieve the hash. After GetHash() has been called once, the instance of the class will become useless and cannot be reused for new data. Never use same Md4Transform instance to generate multiple checksums.

Definition at line 44 of file md4transform.h.


Public Member Functions

 Md4Transform ()
 Default constructor.
 ~Md4Transform ()
 Default destructor.
void sumUp (const uint8_t *data, uint32_t size)
 Adds data to this Md4Transform instance.
void sumUp (const char *data, uint32_t size)
 Adds data to this Md4Transform instance.
Hash< MD4HashgetHash ()
 Finalizes Md4 checksumming operation and returns the checksum of the data.

Private Attributes

uint32_t state [4]
uint32_t count [2]
unsigned char buffer [64]
bool wasFlushed

Constructor & Destructor Documentation

Md4Transform::Md4Transform  ) 
 

Default constructor.

Definition at line 152 of file md4transform.cpp.

References count, and state.

Md4Transform::~Md4Transform  ) 
 

Default destructor.

Definition at line 231 of file md4transform.cpp.

References CHECK, and wasFlushed.


Member Function Documentation

Hash< MD4Hash > Md4Transform::getHash  ) 
 

Finalizes Md4 checksumming operation and returns the checksum of the data.

Call this function only ONCE per each instance of this class.

Returns:
Md4 checksum of the input data

Definition at line 201 of file md4transform.cpp.

References buffer, CHECK, count, Encode(), padding, state, sumUp(), and wasFlushed.

Referenced by MD4HashMaker::getHashSet(), ED2KHashMaker::getHashSet(), and ED2KHashMaker::sumUp().

Here is the call graph for this function:

void Md4Transform::sumUp const char *  data,
uint32_t  size
 

Adds data to this Md4Transform instance.

Parameters:
data Pointer to data.
size Size of data.

Definition at line 235 of file md4transform.cpp.

References sumUp().

Here is the call graph for this function:

void Md4Transform::sumUp const uint8_t *  data,
uint32_t  size
 

Adds data to this Md4Transform instance.

Parameters:
data Pointer pointing to array containing the data.
size Size of the data array.

Definition at line 167 of file md4transform.cpp.

References buffer, CHECK, count, MD4Transform(), state, and wasFlushed.

Referenced by getHash(), ED2KHashMaker::getHashSet(), sumUp(), MD4HashMaker::sumUp(), and ED2KHashMaker::sumUp().

Here is the call graph for this function:


Member Data Documentation

unsigned char Md4Transform::buffer[64] [private]
 

Definition at line 48 of file md4transform.h.

Referenced by getHash(), and sumUp().

uint32_t Md4Transform::count[2] [private]
 

Definition at line 47 of file md4transform.h.

Referenced by getHash(), Md4Transform(), and sumUp().

uint32_t Md4Transform::state[4] [private]
 

Definition at line 46 of file md4transform.h.

Referenced by getHash(), Md4Transform(), and sumUp().

bool Md4Transform::wasFlushed [private]
 

Definition at line 49 of file md4transform.h.

Referenced by getHash(), sumUp(), and ~Md4Transform().


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