OSTC Companion  3.0
Companion sofftware for H&W dive computers
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
AdlerTemplate< T > Class Template Reference

Addler checksum, on 2xN bits. More...

#include <Adler16.h>

Public Member Functions

 AdlerTemplate (T a, T b)
 Initialize checksum with a given seed. More...
 
void reset (T a, T b)
 Re-initialize checksum with a given seed. More...
 
void add (int c)
 Hash a single byte/word. More...
 
void add (const void *buffer, size_t size)
 Hash a block of bytes. More...
 
void add (const QByteArray &buffer)
 Hash all the byte/words for a Qt buffer. More...
 
a () const
 Returns hash result. More...
 
b () const
 
bool check (T a, T b)
 

Detailed Description

template<typename T>
class AdlerTemplate< T >

Addler checksum, on 2xN bits.

Constructor & Destructor Documentation

template<typename T>
AdlerTemplate< T >::AdlerTemplate ( a,
b 
)
inline

Initialize checksum with a given seed.

Member Function Documentation

template<typename T>
T AdlerTemplate< T >::a ( ) const
inline

Returns hash result.

template<typename T>
void AdlerTemplate< T >::add ( int  c)
inline

Hash a single byte/word.

template<typename T>
void AdlerTemplate< T >::add ( const void *  buffer,
size_t  size 
)
inline

Hash a block of bytes.

Note
size is always in BYTE units.
template<typename T>
void AdlerTemplate< T >::add ( const QByteArray &  buffer)
inline

Hash all the byte/words for a Qt buffer.

template<typename T>
T AdlerTemplate< T >::b ( ) const
inline
template<typename T>
bool AdlerTemplate< T >::check ( a,
b 
)
inline

Check Hash result.

Returns
TRUE if has do match the given values.
template<typename T>
void AdlerTemplate< T >::reset ( a,
b 
)
inline

Re-initialize checksum with a given seed.


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