QuaZIP  quazip-0-5-1
quaadler32.h
1 #ifndef QUAADLER32_H
2 #define QUAADLER32_H
3 
4 #include <QByteArray>
5 
6 #include "quachecksum32.h"
7 
9 
13 class QUAZIP_EXPORT QuaAdler32 : public QuaChecksum32
14 {
15 
16 public:
17  QuaAdler32();
18 
19  quint32 calculate(const QByteArray &data);
20 
21  void reset();
22  void update(const QByteArray &buf);
23  quint32 value();
24 
25 private:
26  quint32 checksum;
27 };
28 
29 #endif //QUAADLER32_H
Adler32 checksum.
Definition: quaadler32.h:13
virtual quint32 calculate(const QByteArray &data)=0
Calculates the checksum for data.
virtual quint32 value()=0
Value of the checksum calculated for the stream passed throw update().
Checksum interface.
Definition: quachecksum32.h:28
virtual void update(const QByteArray &buf)=0
Updates the calculated checksum for the stream.
virtual void reset()=0
Resets the calculation on a checksun for a stream.