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

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

SHA1 Secure Hashing Algorithm. More...

#include <psha1.h>

Inheritance diagram for P::SHA1Digest:

P::Digest List of all members.

Public Types

enum  { DIGEST_SIZE = 20, BLOCK_SIZE = 64 }

Public Member Functions

 SHA1Digest ()
 SHA1Digest (const SHA1Digest &dig)
 ~SHA1Digest ()
virtual void update (const char *buff, size_t len)
 Update digest sum.

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

virtual void clear ()
 Clear the digest.

SHA1Digestoperator= (const SHA1Digest &dig)

Detailed Description

SHA1 Secure Hashing Algorithm.

Author:
Christian Prochnow <cproch@seculogix.de>

Definition at line 34 of file psha1.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
DIGEST_SIZE 
BLOCK_SIZE 

Definition at line 36 of file psha1.h.


Constructor & Destructor Documentation

P::SHA1Digest::SHA1Digest  ) 
 

P::SHA1Digest::SHA1Digest const SHA1Digest dig  ) 
 

P::SHA1Digest::~SHA1Digest  ) 
 


Member Function Documentation

virtual void P::SHA1Digest::clear  )  [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().

Implements P::Digest.

virtual std::string P::SHA1Digest::digest  )  const [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

Implements P::Digest.

SHA1Digest& P::SHA1Digest::operator= const SHA1Digest dig  ) 
 

virtual void P::SHA1Digest::update const char *  buff,
size_t  len
[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

Implements P::Digest.


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