BLOCXX_NAMESPACE::MD5 Class Reference

#include <MD5.hpp>

Inheritance diagram for BLOCXX_NAMESPACE::MD5:

BLOCXX_NAMESPACE::MD5OStreamBase

List of all members.

Public Member Functions

 MD5 ()
 MD5 (const String &input)
 Start a MD5 session,.
void init (const String &input)
 ~MD5 ()
void update (const String &input)
 Process more data.
String toString ()
 Finish the digest, and return the results.
unsigned char * getDigest ()

Static Public Member Functions

static String convertBinToHex (const unsigned char *sBin)

Static Private Member Functions

static void MD5Init (MD5_CTX *md5ctx)
static void MD5Update (MD5_CTX *md5ctx, const unsigned char *input, UInt32 inputLen)
static void MD5Final (unsigned char *, MD5_CTX *)

Private Attributes

MD5_CTX m_ctx
unsigned char m_digest [16]
bool m_finished

Friends

class MD5StreamBuffer

Classes

struct  MD5_CTX


Detailed Description

Definition at line 101 of file MD5.hpp.


Constructor & Destructor Documentation

BLOCXX_NAMESPACE::MD5::MD5 (  ) 

Definition at line 77 of file MD5.cpp.

References m_ctx, and MD5Init().

BLOCXX_NAMESPACE::MD5::MD5 ( const String input  ) 

Start a MD5 session,.

Parameters:
input The initial data to process.

Definition at line 91 of file MD5.cpp.

References m_ctx, MD5Init(), and update().

BLOCXX_NAMESPACE::MD5::~MD5 (  )  [inline]

Definition at line 112 of file MD5.hpp.


Member Function Documentation

void BLOCXX_NAMESPACE::MD5::init ( const String input  ) 

Definition at line 84 of file MD5.cpp.

References m_ctx, m_finished, MD5Init(), and update().

void BLOCXX_NAMESPACE::MD5::update ( const String input  ) 

Process more data.

Parameters:
input the additional data to process.

Definition at line 99 of file MD5.cpp.

References BLOCXX_THROW, BLOCXX_NAMESPACE::String::c_str(), BLOCXX_NAMESPACE::String::length(), m_ctx, m_finished, and MD5Update().

Referenced by init(), and MD5().

String BLOCXX_NAMESPACE::MD5::toString (  ) 

Finish the digest, and return the results.

Returns:
the results of the digest.

Definition at line 110 of file MD5.cpp.

References convertBinToHex(), and getDigest().

unsigned char * BLOCXX_NAMESPACE::MD5::getDigest (  ) 

Definition at line 116 of file MD5.cpp.

References m_ctx, m_digest, m_finished, and MD5Final().

Referenced by toString().

String BLOCXX_NAMESPACE::MD5::convertBinToHex ( const unsigned char *  sBin  )  [static]

Definition at line 127 of file MD5.cpp.

References i, BLOCXX_NAMESPACE::MD5HASHHEXLEN, and BLOCXX_NAMESPACE::MD5HASHLEN.

Referenced by toString().

void BLOCXX_NAMESPACE::MD5::MD5Init ( MD5_CTX md5ctx  )  [static, private]

Definition at line 241 of file MD5.cpp.

References BLOCXX_NAMESPACE::MD5::MD5_CTX::count, and BLOCXX_NAMESPACE::MD5::MD5_CTX::state.

Referenced by init(), and MD5().

void BLOCXX_NAMESPACE::MD5::MD5Update ( MD5_CTX md5ctx,
const unsigned char *  input,
UInt32  inputLen 
) [static, private]

Definition at line 256 of file MD5.cpp.

References BLOCXX_NAMESPACE::MD5::MD5_CTX::buffer, BLOCXX_NAMESPACE::MD5::MD5_CTX::count, i, BLOCXX_NAMESPACE::MD5Transform(), and BLOCXX_NAMESPACE::MD5::MD5_CTX::state.

Referenced by MD5Final(), BLOCXX_NAMESPACE::MD5StreamBuffer::overflow(), update(), and BLOCXX_NAMESPACE::MD5StreamBuffer::xsputn().

void BLOCXX_NAMESPACE::MD5::MD5Final ( unsigned char *  digest,
MD5_CTX context 
) [static, private]

Definition at line 292 of file MD5.cpp.

References BLOCXX_NAMESPACE::MD5::MD5_CTX::count, BLOCXX_NAMESPACE::Encode(), MD5Update(), BLOCXX_NAMESPACE::PADDING, and BLOCXX_NAMESPACE::MD5::MD5_CTX::state.

Referenced by getDigest().


Friends And Related Function Documentation

friend class MD5StreamBuffer [friend]

Definition at line 139 of file MD5.hpp.


Member Data Documentation

MD5_CTX BLOCXX_NAMESPACE::MD5::m_ctx [private]

Definition at line 132 of file MD5.hpp.

Referenced by getDigest(), init(), MD5(), BLOCXX_NAMESPACE::MD5StreamBuffer::overflow(), update(), and BLOCXX_NAMESPACE::MD5StreamBuffer::xsputn().

unsigned char BLOCXX_NAMESPACE::MD5::m_digest[16] [private]

Definition at line 133 of file MD5.hpp.

Referenced by getDigest().

bool BLOCXX_NAMESPACE::MD5::m_finished [private]

Definition at line 134 of file MD5.hpp.

Referenced by getDigest(), init(), and update().


The documentation for this class was generated from the following files:
Generated on Fri Sep 21 23:42:37 2007 for blocxx by  doxygen 1.5.3