quaadler32.h
#ifndef QUAADLER32_H
#define QUAADLER32_H
/*
Copyright (C) 2010 Adam Walczak
Copyright (C) 2005-2014 Sergey A. Tachenov
This file is part of QuaZip.
QuaZip is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 2.1 of the License, or
(at your option) any later version.
QuaZip is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with QuaZip. If not, see <http://www.gnu.org/licenses/>.
See COPYING file for the full LGPL text.
Original ZIP package is copyrighted by Gilles Vollant and contributors,
see quazip/(un)zip.h files for details. Basically it's the zlib license.
*/
#include <QtCore/QByteArray>
#include "quachecksum32.h"
class QUAZIP_EXPORT QuaAdler32 : public QuaChecksum32
{
public:
QuaAdler32();
quint32 calculate(const QByteArray &data) override;
void reset() override;
void update(const QByteArray &buf) override;
quint32 value() override;
private:
quint32 checksum{};
};
#endif //QUAADLER32_H
QuaChecksum32
Checksum interface.
Definition quachecksum32.h:53
QuaChecksum32::calculate
virtual quint32 calculate(const QByteArray &data)=0
Calculates the checksum for data.
QuaChecksum32::update
virtual void update(const QByteArray &buf)=0
Updates the calculated checksum for the stream.
QuaChecksum32::reset
virtual void reset()=0
Resets the calculation on a checksun for a stream.
QuaChecksum32::value
virtual quint32 value()=0
Value of the checksum calculated for the stream passed throw update().