File indexing completed on 2024-05-05 17:57:23
0001 /* 0002 SPDX-FileCopyrightText: 2003 Csaba Karai <krusader@users.sourceforge.net> 0003 SPDX-FileCopyrightText: 2004-2022 Krusader Krew <https://krusader.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef CRC32_H 0009 #define CRC32_H 0010 0011 class CRC32 0012 { 0013 private: 0014 unsigned long crc_accum; 0015 static unsigned long crc_table[256]; 0016 static bool crc_initialized; 0017 0018 public: 0019 explicit CRC32(unsigned long initialValue = (unsigned long)-1); 0020 0021 void update(unsigned char *buffer, int bufferLen); 0022 unsigned long result(); 0023 }; 0024 0025 #endif /* __CRC32_H__ */