quacrc32.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef QUACRC32_H
  2. #define QUACRC32_H
  3. /*
  4. Copyright (C) 2005-2014 Sergey A. Tachenov
  5. This file is part of QuaZIP.
  6. QuaZIP is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU Lesser General Public License as published by
  8. the Free Software Foundation, either version 2.1 of the License, or
  9. (at your option) any later version.
  10. QuaZIP is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU Lesser General Public License for more details.
  14. You should have received a copy of the GNU Lesser General Public License
  15. along with QuaZIP. If not, see <http://www.gnu.org/licenses/>.
  16. See COPYING file for the full LGPL text.
  17. Original ZIP package is copyrighted by Gilles Vollant and contributors,
  18. see quazip/(un)zip.h files for details. Basically it's the zlib license.
  19. */
  20. #include "quachecksum32.h"
  21. ///CRC32 checksum
  22. /** \class QuaCrc32 quacrc32.h <quazip/quacrc32.h>
  23. * This class wrappers the crc32 function with the QuaChecksum32 interface.
  24. * See QuaChecksum32 for more info.
  25. */
  26. class QUAZIP_EXPORT QuaCrc32 : public QuaChecksum32 {
  27. public:
  28. QuaCrc32();
  29. quint32 calculate(const QByteArray &data);
  30. void reset();
  31. void update(const QByteArray &buf);
  32. quint32 value();
  33. private:
  34. quint32 checksum;
  35. };
  36. #endif //QUACRC32_H