Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

MD5Hash Class Reference

Hash function class. More...

#include <MD5Hash.h>

List of all members.

Public Member Functions

 MD5Hash ()
 Constructor.
 ~MD5Hash ()
 Destructor.
void Init ()
 Start MD5 accumulation. Set bit count to 0 and buffer to mysterious initialization constants.
void Update (unsigned char const *Buffer, unsigned Length)
 Update context to reflect the concatenation of another buffer full of bytes.
void Final (unsigned char Digest[MD5_HASHBYTES])
 Final wrapup - pad to 64-byte boundary with the bit pattern 1 0* (64-bit count of bits processed, MSB-first).

Protected Member Functions

void Transform (unsigned __int32 buf[4], unsigned __int32 const in[16])
 The core of the MD5 algorithm, this alters an existing MD5 hash to reflect the addition of 16 longwords of new data. MD5Update blocks the data and converts bytes into longwords for this routine.

Private Attributes

unsigned __int32 m_Buffer [4]
 holds hash algorithm data
unsigned __int32 m_Bits [2]
 holds hash algorithm data
unsigned char m_In [64]
 holds hash algorithm data


Detailed Description

This class is based off of Ron Rivest and Colin Plumb's implementation of a hash function written in C

Definition at line 19 of file MD5Hash.h.


Member Function Documentation

void MD5Hash::Final unsigned char  Digest[MD5_HASHBYTES]  ) 
 

Parameters:
Digest is the hash value being manipulated

Definition at line 111 of file MD5Hash.cpp.

References byteReverse(), m_Bits, m_Buffer, m_In, and Transform().

Referenced by MD5HashAlgorithm< Key >::Hash(), MD5TalonStateDataHashAlgorithm::Hash(), and MD5StateWithLocationsHashAlgorithm::Hash().

void MD5Hash::Update unsigned char const *  Buffer,
unsigned  Length
 

Parameters:
Buffer is the value to be hashed
Length is the size of bytes of the value

Definition at line 59 of file MD5Hash.cpp.

References byteReverse(), m_Bits, m_Buffer, m_In, and Transform().

Referenced by MD5HashAlgorithm< Key >::Hash(), MD5TalonStateDataHashAlgorithm::Hash(), and MD5StateWithLocationsHashAlgorithm::Hash().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 11:20:17 2005 for Cpp Freecell Solver by  doxygen 1.4.4