ED2KHashMaker Class Reference

#include <hashsetmaker.h>

Inheritance diagram for ED2KHashMaker:

Inheritance graph
[legend]
Collaboration diagram for ED2KHashMaker:

Collaboration graph
[legend]
List of all members.

Detailed Description

Generates ED2KHashSet.

Uses MD4Hasher internally.

Definition at line 60 of file hashsetmaker.h.


Public Member Functions

 ED2KHashMaker ()
 Constructor.
virtual ~ED2KHashMaker ()
 Destructor.
virtual void sumUp (const char *data, uint32_t length)
 Continue ED2KHashset generation.
virtual HashSetBasegetHashSet ()

Private Types

typedef std::vector< Hash<
MD4Hash > >::iterator 
Iter
 Makes life simpler.

Private Attributes

bool m_completed
 If HashSet generation has been completed.
Md4Transformm_transformer
 Md4 transformer pointer used for checksumming.
uint32_t m_dataCount
 Temporary counter used to detect chunk size hits.
std::vector< Hash< MD4Hash > > m_chunks
 Gets filled with part hashes.
Hash< MD4Hashm_fileHash
 Receives final file hash.

Member Typedef Documentation

typedef std::vector< Hash<MD4Hash> >::iterator ED2KHashMaker::Iter [private]
 

Makes life simpler.

Definition at line 96 of file hashsetmaker.h.


Constructor & Destructor Documentation

ED2KHashMaker::ED2KHashMaker  ) 
 

Constructor.

Definition at line 37 of file hashsetmaker.cpp.

ED2KHashMaker::~ED2KHashMaker  )  [virtual]
 

Destructor.

Definition at line 42 of file hashsetmaker.cpp.

References m_completed, and m_transformer.


Member Function Documentation

HashSetBase * ED2KHashMaker::getHashSet  )  [virtual]
 

Returns:
Resulting hashset, downcasted to abstract base class

The resulting hashset

Implements HashSetMaker.

Definition at line 73 of file hashsetmaker.cpp.

References HashSet< HashType, FileHashType, ChunkSize >::addChunkHash(), CHECK_THROW, Hash< HashType >::getData(), Md4Transform::getHash(), m_chunks, m_completed, m_fileHash, m_transformer, HashSet< HashType, FileHashType, ChunkSize >::setFileHash(), and Md4Transform::sumUp().

Here is the call graph for this function:

void ED2KHashMaker::sumUp const char *  data,
uint32_t  length
[virtual]
 

Continue ED2KHashset generation.

Parameters:
data Data to be hashed
length Length of passed data

Implements HashSetMaker.

Definition at line 49 of file hashsetmaker.cpp.

References CHECK_THROW, ED2K_PARTSIZE, Md4Transform::getHash(), m_chunks, m_dataCount, m_transformer, and Md4Transform::sumUp().

Here is the call graph for this function:


Member Data Documentation

std::vector< Hash<MD4Hash> > ED2KHashMaker::m_chunks [private]
 

Gets filled with part hashes.

Definition at line 93 of file hashsetmaker.h.

Referenced by getHashSet(), and sumUp().

bool ED2KHashMaker::m_completed [private]
 

If HashSet generation has been completed.

Definition at line 84 of file hashsetmaker.h.

Referenced by getHashSet(), and ~ED2KHashMaker().

uint32_t ED2KHashMaker::m_dataCount [private]
 

Temporary counter used to detect chunk size hits.

Definition at line 90 of file hashsetmaker.h.

Referenced by sumUp().

Hash<MD4Hash> ED2KHashMaker::m_fileHash [private]
 

Receives final file hash.

Definition at line 99 of file hashsetmaker.h.

Referenced by getHashSet().

Md4Transform* ED2KHashMaker::m_transformer [private]
 

Md4 transformer pointer used for checksumming.

Definition at line 87 of file hashsetmaker.h.

Referenced by getHashSet(), sumUp(), and ~ED2KHashMaker().


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