Adler32 Class Reference

#include <Adler32.hpp>

List of all members.


Detailed Description

This class is used to generate an Alder-32 checksum for a sequence of bytes.

Definition at line 44 of file Adler32.hpp.

Public Member Functions

 Adler32 ()
 Default constructor.
void reset ()
 Resets the Adler32 to initial value.
unsigned int getValue () const
 Returns the Adler32 value.
void update (const std::string &str)
 Updates the Adler32 with specified array of bytes.
void update (const std::auto_ptr< std::string > &str)
 Updates the Adler32 with specified array of bytes.
void update (const char *buf, unsigned int len)
 Updates the Adler32 with specified array of bytes.

Protected Attributes

unsigned int a
 The current sum.
unsigned int b
 The current a sum.

Static Protected Attributes

const unsigned int mod = 65521
 Largest prime less that 2^16.


Constructor & Destructor Documentation

Adler32  )  [inline]
 

Default constructor.

Definition at line 60 of file Adler32.hpp.


Member Function Documentation

unsigned int getValue  )  const [inline]
 

Returns the Adler32 value.

Returns:
The current checksum value.

Definition at line 79 of file Adler32.hpp.

Referenced by PNG::alder().

void reset void   )  [inline]
 

Resets the Adler32 to initial value.

Definition at line 69 of file Adler32.hpp.

void update const char *  buf,
unsigned int  len
 

Updates the Adler32 with specified array of bytes.

Parameters:
buf The byte array to update the Adler32 with.
len The number of bytes to use for the update.

void update const std::auto_ptr< std::string > &  str  )  [inline]
 

Updates the Adler32 with specified array of bytes.

Parameters:
str The string to update the Adler32 with.

Definition at line 99 of file Adler32.hpp.

void update const std::string &  str  )  [inline]
 

Updates the Adler32 with specified array of bytes.

Parameters:
str The string to update the Adler32 with.

Definition at line 89 of file Adler32.hpp.

Referenced by PNG::alder().


Member Data Documentation

unsigned int a [protected]
 

The current sum.

Definition at line 51 of file Adler32.hpp.

unsigned int b [protected]
 

The current a sum.

Definition at line 54 of file Adler32.hpp.

const unsigned int mod = 65521 [static, protected]
 

Largest prime less that 2^16.

Definition at line 48 of file Adler32.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 03:31:51 2010 for GPS ToolKit Software Library by  doxygen 1.3.9.1