QuaZip quazip-1-4
quachecksum32.h
1#ifndef QUACHECKSUM32_H
2#define QUACHECKSUM32_H
3
4/*
5Copyright (C) 2005-2014 Sergey A. Tachenov
6
7This file is part of QuaZip.
8
9QuaZip is free software: you can redistribute it and/or modify
10it under the terms of the GNU Lesser General Public License as published by
11the Free Software Foundation, either version 2.1 of the License, or
12(at your option) any later version.
13
14QuaZip is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License
20along with QuaZip. If not, see <http://www.gnu.org/licenses/>.
21
22See COPYING file for the full LGPL text.
23
24Original ZIP package is copyrighted by Gilles Vollant and contributors,
25see quazip/(un)zip.h files for details. Basically it's the zlib license.
26*/
27
28#include <QtCore/QByteArray>
29#include "quazip_global.h"
30
32
52class QUAZIP_EXPORT QuaChecksum32
53{
54
55public:
56 virtual ~QuaChecksum32();
58
63 virtual quint32 calculate(const QByteArray &data) = 0;
64
66 virtual void reset() = 0;
67
69
71 virtual void update(const QByteArray &buf) = 0;
72
74
76 virtual quint32 value() = 0;
77};
78
79#endif //QUACHECKSUM32_H
Checksum interface.
Definition: quachecksum32.h:53
virtual quint32 calculate(const QByteArray &data)=0
Calculates the checksum for data.
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.
virtual quint32 value()=0
Value of the checksum calculated for the stream passed throw update().