00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __TOOLBOX_CHECKSUM_H
00010 #define __TOOLBOX_CHECKSUM_H
00011
00012
00013 namespace toolbox
00014 {
00020 class ChecksumCalculator
00021 {
00022 private:
00023
00027 unsigned long Crc32Table[256];
00028
00029 #ifdef _TOOLBOX_TEST
00030
00033 static int InstanceCount;
00034 #endif
00035
00036 public:
00037
00041 ChecksumCalculator();
00042
00046 ~ChecksumCalculator();
00047
00054 unsigned long GetCrc32(const char * buffer, int len);
00055
00056 #ifdef _TOOLBOX_TEST
00057
00063 static void RunTestSuite(int * performedTests, int * failedTests);
00064 #endif
00065 };
00066 }
00067
00068
00069 #endif