8 #define CRYPTOPP_CRC32_H 12 const uint32_t CRC32_NEGL = 0xffffffffL;
14 #ifdef __LITTLE_ENDIAN__ 15 #define CRC32_INDEX(c) (c & 0xff) 16 #define CRC32_SHIFTED(c) (c >> 8) 18 #define CRC32_INDEX(c) (c >> 24) 19 #define CRC32_SHIFTED(c) (c << 8) 33 void update(
const uint8_t *input,
unsigned length);
35 void truncatedFinal(uint8_t *hash,
unsigned size);
37 void updateByte(uint8_t b) { m_crc = m_tab[CRC32_INDEX(m_crc) ^ b] ^ CRC32_SHIFTED(m_crc); }
38 uint8_t getCrcByte(
unsigned i)
const {
return ((uint8_t *)&(m_crc))[i]; }
46 static const uint32_t m_tab[256];
CRC Checksum Calculation.
Definition: apps/elftosb/common/crc.h:23