Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

RMD160Hash Class Reference

RMD160 mesage digest / hash algorithm (RIPE MD 160). More...

#include <rmd160hash.h>

Inheritance diagram for RMD160Hash:

Inheritance graph
[legend]
Collaboration diagram for RMD160Hash:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RMD160Hash ()
 Constructor for RMD160 hash.

 ~RMD160Hash ()
 Destructor cleans up the hash state.

const Parameters * GetPar () const
 Get parameters of this hash algo; see base clas.

uint64 FedBytes () const
 Returns number of fed bytes; see base class.

void reset ()
 Reset has algo; see base class.

void feed (const char *buf, size_t len)
 Feed the hash algo with data; see base class.

void final ()
 Finish hash computation; see base class.

void GetHash (char *buf) const
 Get current has value; see base class.


Static Public Attributes

const Parameters par
 Parameters of the hash algo.


Private Member Functions

void AtomicHash (const unsigned char *msg, uint32 *w)
 RMD160Hash (const RMD160Hash &)
 Do not use these:.

void operator= (const RMD160Hash &)

Private Attributes

uint32 state [5]
 hash status; hash value

unsigned char tmpbuf [64]
 may be over from last call to Feed()

int tmp_size
 Internally used "atomic" hash; msg has a size of 64 bytes.


Detailed Description

RMD160 mesage digest / hash algorithm (RIPE MD 160).

Author:
Wolfgang Wieser ] wwieser (a) gmx <*> de [
NOTE: This class is NOT "C++-safe" and you should generally be careful with cryptographic data, so it is best to manage (de)allocation of these objects in a higher order.

Definition at line 40 of file rmd160hash.h.


Constructor & Destructor Documentation

RMD160Hash::RMD160Hash const RMD160Hash  )  [private]
 

Do not use these:.

RMD160Hash::RMD160Hash  )  [inline]
 

Constructor for RMD160 hash.

Definition at line 61 of file rmd160hash.h.

References reset().

RMD160Hash::~RMD160Hash  )  [inline]
 

Destructor cleans up the hash state.

Definition at line 64 of file rmd160hash.h.

References reset().


Member Function Documentation

void RMD160Hash::AtomicHash const unsigned char *  msg,
uint32 w
[private]
 

Definition at line 91 of file rmd160hash.cc.

References K, KK, R, rmd_func0(), rmd_func1(), rmd_func2(), rmd_func3(), rmd_func4(), rotate(), RR, S, SS, state, and uint32.

Referenced by feed(), and final().

uint64 RMD160Hash::FedBytes  )  const [inline, virtual]
 

Returns number of fed bytes; see base class.

Reimplemented from SecureHashBase.

Definition at line 72 of file rmd160hash.h.

References uint64.

void RMD160Hash::feed const char *  buf,
size_t  len
[virtual]
 

Feed the hash algo with data; see base class.

Reimplemented from SecureHashBase.

Definition at line 625 of file rmd160hash.cc.

References AtomicHash(), tmp_size, tmpbuf, uint32, and uint64.

void RMD160Hash::final  )  [virtual]
 

Finish hash computation; see base class.

Reimplemented from SecureHashBase.

Definition at line 676 of file rmd160hash.cc.

References AtomicHash(), tmp_size, tmpbuf, uint32, and uint64.

void RMD160Hash::GetHash char *  buf  )  const [virtual]
 

Get current has value; see base class.

Reimplemented from SecureHashBase.

Definition at line 595 of file rmd160hash.cc.

References state, and uint32.

const Parameters* RMD160Hash::GetPar  )  const [inline, virtual]
 

Get parameters of this hash algo; see base clas.

Reimplemented from SecureHashBase.

Definition at line 68 of file rmd160hash.h.

References par.

void RMD160Hash::operator= const RMD160Hash  )  [private]
 

void RMD160Hash::reset  )  [virtual]
 

Reset has algo; see base class.

Reimplemented from SecureHashBase.

Definition at line 609 of file rmd160hash.cc.

References rmd_init_state, state, tmp_size, and tmpbuf.

Referenced by RMD160Hash(), and ~RMD160Hash().


Member Data Documentation

const SecureHashBase::Parameters RMD160Hash::par [static]
 

Initial value:

{
    INIT_FIELD(hash_size) 20,
    INIT_FIELD(block_size) 64,
    INIT_FIELD(hash_ID) 0x2000,
    INIT_FIELD(name) "RMD160"
}
Parameters of the hash algo.

Reimplemented from SecureHashBase.

Definition at line 20 of file rmd160hash.cc.

Referenced by GetPar().

uint32 RMD160Hash::state[5] [private]
 

hash status; hash value

Definition at line 47 of file rmd160hash.h.

Referenced by AtomicHash(), GetHash(), and reset().

int RMD160Hash::tmp_size [private]
 

Internally used "atomic" hash; msg has a size of 64 bytes.

Definition at line 51 of file rmd160hash.h.

Referenced by feed(), final(), and reset().

unsigned char RMD160Hash::tmpbuf[64] [private]
 

may be over from last call to Feed()

Definition at line 50 of file rmd160hash.h.

Referenced by feed(), final(), and reset().


The documentation for this class was generated from the following files:
Generated on Sat Feb 19 22:35:36 2005 for Ray by doxygen 1.3.5