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

P::Digest Class Reference
[Crypto/Digest library]

Digest base class. More...

#include <pdigest.h>

Inheritance diagram for P::Digest:

P::MD4Digest P::MD5Digest P::SHA1Digest List of all members.

Public Member Functions

 Digest ()
virtual ~Digest ()
virtual void update (const char *buff, size_t len)=0
 Update digest sum.

virtual std::string digest () const=0
 Get the current digest.

virtual void clear ()=0
 Clear the digest.

Digestoperator<< (const std::string &str)
 Update digest sum.


Friends

PCRYPTO_EXPORT std::ostream & operator<< (std::ostream &os, const Digest &dig)
 Output digest.


Detailed Description

Digest base class.

The base class for digest algorithms.

Author:
Christian Prochnow <cproch@seculogix.de>

Definition at line 39 of file pdigest.h.


Constructor & Destructor Documentation

P::Digest::Digest  ) 
 

virtual P::Digest::~Digest  )  [virtual]
 


Member Function Documentation

virtual void P::Digest::clear  )  [pure virtual]
 

Clear the digest.

Reinitializes the digest object. Wipes out current object state and reinitializes it with the magic values. After that you can calculate another digest using update().

Implemented in P::MD4Digest, P::MD5Digest, and P::SHA1Digest.

virtual std::string P::Digest::digest  )  const [pure virtual]
 

Get the current digest.

Retrieves the current digest sum as a string. The method does not wipe out the current object state, if you want to re-use the object to calculate another sum call clear().

Returns:
A string containing the current digest

Implemented in P::MD4Digest, P::MD5Digest, and P::SHA1Digest.

Digest& P::Digest::operator<< const std::string &  str  ) 
 

Update digest sum.

virtual void P::Digest::update const char *  buff,
size_t  len
[pure virtual]
 

Update digest sum.

Updates the digest. The method may be called many times before the digest string is being retrieved with digest().

Parameters:
buff The input buffer
len Size of the input buffer

Implemented in P::MD4Digest, P::MD5Digest, and P::SHA1Digest.


Friends And Related Function Documentation

PCRYPTO_EXPORT std::ostream& operator<< std::ostream &  os,
const Digest dig
[friend]
 

Output digest.


The documentation for this class was generated from the following file:
Generated on Fri Mar 12 21:08:33 2004 for P::Classes by doxygen 1.3.3