oln::utils::MD5 Class Reference

Class used to compute a MD5 digest. More...

#include <md5.hh>

Collaboration diagram for oln::utils::MD5:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ntg::int_u32 value_type
 Value to work on.
typedef ntg::type_traits<
value_type >::storage_type 
storage_type
 Representation type of value type.

Public Member Functions

 MD5 (buffer b)
 Constructor.
key execute ()
 Compute the digest.
key gen_key ()
 Generate the key.
template<class Fun>
void sub_step (const Fun &fun, storage_type &a, const storage_type &b, const storage_type &c, const storage_type &d, unsigned k, unsigned s, unsigned i)

Protected Member Functions

void sav ()
 initialization of a MD5 algorithm step.
void round1 ()
 Round 1 of the algorithm.
void round2 ()
 Round 2 of the algorithm.
void round3 ()
 Round 3 of the algorithm.
void round4 ()
 Round 4 of the algorithm.
void step ()
 A step of the algorithm.
template<class Fun>
void sub_step (const Fun &fun, storage_type &a, const storage_type &b, const storage_type &c, const storage_type &d, unsigned k, unsigned s, unsigned i)
 Sub step to update a register value.
void gen_sub_key (std::vector< key::value_type > &v, storage_type x, unsigned base)
 Generate a sub part of the key.

Protected Attributes

buffer buffer_
 The buffer to process.
std::vector< storage_typeX
 Vector of 16 words.
std::vector< storage_typeT
 Vector of 64 words.
unsigned current_
 Current position in the buffer.
storage_type aa
 Save of a.
storage_type bb
 Save of b.
storage_type cc
 Save of c.
storage_type dd
 Save of d.
storage_type a
 A register.
storage_type b
 B register.
storage_type c
 C register.
storage_type d
 D register.
F_ F
G_ G
H_ H
I_ I

Classes

struct  F_
 Functor for bit operations. More...
struct  G_
 Functor for bit operations. More...
struct  H_
 Functor for bit operations. More...
struct  I_
 Functor for bit operations. More...

Detailed Description

Class used to compute a MD5 digest.

Definition at line 44 of file md5.hh.


Constructor & Destructor Documentation

oln::utils::MD5::MD5 ( buffer  b  )  [inline, explicit]

Constructor.

Initialization from a buffer.

Definition at line 243 of file md5.hh.


Member Function Documentation

key oln::utils::MD5::gen_key (  )  [inline]

Generate the key.

Precondition:
To avoid meaningless result, you should call execute before.

Definition at line 474 of file md5.hh.

void oln::utils::MD5::gen_sub_key ( std::vector< key::value_type > &  v,
storage_type  x,
unsigned  base 
) [inline, protected]

Generate a sub part of the key.

Definition at line 461 of file md5.hh.


The documentation for this class was generated from the following files:
Generated on Tue Feb 20 20:30:03 2007 for Olena by  doxygen 1.5.1