MD5 Class Reference

#include <md5.h>

List of all members.

Public Member Functions

 MD5 ()
void update (unsigned char *input, unsigned int input_length)
void update (char *input)
void update (const char input[])
void update (istream &stream)
void update (FILE *file)
void update (ifstream &stream)
void finalize ()
 MD5 (unsigned char *string)
 MD5 (char *string)
 MD5 (istream &stream)
 MD5 (FILE *file)
 MD5 (ifstream &stream)
unsigned char * raw_digest ()
char * hex_digest ()

Private Types

typedef unsigned int uint4
typedef unsigned short int uint2
typedef unsigned char uint1

Private Member Functions

void init ()
void transform (uint1 *buffer)

Static Private Member Functions

static void encode (uint1 *dest, uint4 *src, uint4 length)
static void decode (uint4 *dest, uint1 *src, uint4 length)
static void memcpy (uint1 *dest, uint1 *src, uint4 length)
static void memset (uint1 *start, uint1 val, uint4 length)
static uint4 rotate_left (uint4 x, uint4 n)
static uint4 F (uint4 x, uint4 y, uint4 z)
static uint4 G (uint4 x, uint4 y, uint4 z)
static uint4 H (uint4 x, uint4 y, uint4 z)
static uint4 I (uint4 x, uint4 y, uint4 z)
static void FF (uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac)
static void GG (uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac)
static void HH (uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac)
static void II (uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac)

Private Attributes

char result [33]
uint4 state [4]
uint4 count [2]
uint1 buffer [64]
uint1 digest [16]
uint1 finalized

Friends

ostream & operator<< (ostream &, MD5 context)


Member Typedef Documentation

typedef unsigned int MD5::uint4 [private]

typedef unsigned short int MD5::uint2 [private]

typedef unsigned char MD5::uint1 [private]


Constructor & Destructor Documentation

MD5::MD5 (  ) 

References init().

MD5::MD5 ( unsigned char *  string  ) 

References finalize(), init(), and update().

MD5::MD5 ( char *  string  ) 

References finalize(), init(), and update().

MD5::MD5 ( istream stream  ) 

References finalize(), init(), and update().

MD5::MD5 ( FILE *  file  ) 

References finalize(), init(), and update().

MD5::MD5 ( ifstream &  stream  ) 

References finalize(), init(), and update().


Member Function Documentation

void MD5::update ( unsigned char *  input,
unsigned int  input_length 
)

void MD5::update ( char *  input  ) 

References update().

void MD5::update ( const char  input[]  ) 

References update().

void MD5::update ( istream stream  ) 

References update().

void MD5::update ( FILE *  file  ) 

References buffer, and update().

void MD5::update ( ifstream &  stream  ) 

References buffer, and update().

void MD5::finalize (  ) 

unsigned char * MD5::raw_digest (  ) 

References digest, finalized, and memcpy().

char * MD5::hex_digest (  ) 

References digest, finalized, and result.

Referenced by cadbc::login(), and operator<<().

void MD5::init (  )  [private]

References count, finalized, and state.

Referenced by MD5().

void MD5::transform ( uint1 buffer  )  [private]

Referenced by update().

void MD5::encode ( uint1 dest,
uint4 src,
uint4  length 
) [static, private]

Referenced by finalize().

void MD5::decode ( uint4 dest,
uint1 src,
uint4  length 
) [static, private]

void MD5::memcpy ( uint1 dest,
uint1 src,
uint4  length 
) [static, private]

Referenced by raw_digest(), and update().

void MD5::memset ( uint1 start,
uint1  val,
uint4  length 
) [static, private]

Referenced by finalize().

unsigned int MD5::rotate_left ( uint4  x,
uint4  n 
) [inline, static, private]

Referenced by FF(), GG(), HH(), and II().

unsigned int MD5::F ( uint4  x,
uint4  y,
uint4  z 
) [inline, static, private]

Referenced by FF().

unsigned int MD5::G ( uint4  x,
uint4  y,
uint4  z 
) [inline, static, private]

Referenced by GG().

unsigned int MD5::H ( uint4  x,
uint4  y,
uint4  z 
) [inline, static, private]

Referenced by HH().

unsigned int MD5::I ( uint4  x,
uint4  y,
uint4  z 
) [inline, static, private]

Referenced by II().

void MD5::FF ( uint4 a,
uint4  b,
uint4  c,
uint4  d,
uint4  x,
uint4  s,
uint4  ac 
) [inline, static, private]

References F(), and rotate_left().

void MD5::GG ( uint4 a,
uint4  b,
uint4  c,
uint4  d,
uint4  x,
uint4  s,
uint4  ac 
) [inline, static, private]

References G(), and rotate_left().

void MD5::HH ( uint4 a,
uint4  b,
uint4  c,
uint4  d,
uint4  x,
uint4  s,
uint4  ac 
) [inline, static, private]

References H(), and rotate_left().

void MD5::II ( uint4 a,
uint4  b,
uint4  c,
uint4  d,
uint4  x,
uint4  s,
uint4  ac 
) [inline, static, private]

References I(), and rotate_left().


Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
MD5  context 
) [friend]


Member Data Documentation

char MD5::result[33] [private]

Referenced by hex_digest().

uint4 MD5::state[4] [private]

Referenced by finalize(), and init().

uint4 MD5::count[2] [private]

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

uint1 MD5::buffer[64] [private]

Referenced by finalize(), and update().

uint1 MD5::digest[16] [private]

Referenced by finalize(), hex_digest(), and raw_digest().

uint1 MD5::finalized [private]


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

Generated on Wed Aug 10 11:57:12 2011 for Softwares from Orpara by  doxygen 1.5.6