libcommonc++  0.7
Checksum Class Referenceabstract

A base class for checksum generators. More...

#include <Checksum.h++>

Inheritance diagram for Checksum:

Public Member Functions

virtual ~Checksum ()
 Destructor. More...
 
virtual void update (const byte_t *buf, size_t len)=0
 Update the checksum with more data. More...
 
uint32_t finish ()
 Finish generating the checksum. More...
 
void reset ()
 Reset the object for a new checksum. More...
 

Protected Member Functions

 Checksum ()
 Constructor. More...
 

Protected Attributes

uint32_t _sum
 The current checksum value. More...
 

Detailed Description

A base class for checksum generators.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ ~Checksum()

~Checksum ( )
virtual

Destructor.

◆ Checksum()

Checksum ( )
protected

Constructor.

Member Function Documentation

◆ finish()

uint32_t finish ( )

Finish generating the checksum.

Returns
The checksum.

◆ reset()

void reset ( )

Reset the object for a new checksum.

◆ update()

virtual void update ( const byte_t buf,
size_t  len 
)
pure virtual

Update the checksum with more data.

Parameters
bufA pointer to the data.
lenThe length of the data.

Implemented in CRC32Checksum.

Member Data Documentation

◆ _sum

uint32_t _sum
protected

The current checksum value.


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