INNER CODE UNIT · C++
buffer
7thSamurai/steganography · src/crc32.cpp:74
auto buffer = reinterpret_cast<const std::uint8_t*>(data);
for (std::size_t i = 0; i < size; i++) {
hash = crc_table[(hash ^ buffer[i]) & 0xFF] ^ (hash >> 8);
}
}
std::uint32_t CRC32::get_hash() const {
return hash ^ 0xFFFFFFFF;
}