/ghost/crc32.h

http://ghostcb.googlecode.com/ · C Header · 18 lines · 14 code · 4 blank · 0 comment · 0 complexity · 691a61568f2306201cdb506adc4db48f MD5 · raw file

  1. #ifndef CRC32_H
  2. #define CRC32_H
  3. #define CRC32_POLYNOMIAL 0x04c11db7
  4. class CCRC32
  5. {
  6. public:
  7. void Initialize( );
  8. uint32_t FullCRC( unsigned char *sData, uint32_t ulLength );
  9. void PartialCRC( uint32_t *ulInCRC, unsigned char *sData, uint32_t ulLength );
  10. private:
  11. uint32_t Reflect( uint32_t ulReflect, char cChar );
  12. uint32_t ulTable[256];
  13. };
  14. #endif