Пример #1
0
// A CRC-32 computer based on crc_basic, for timing
boost::uint32_t
basic_crc32
(
    void const *  buffer,
    std::size_t   byte_count
)
{
    static  boost::crc_basic<32>  computer( 0x04C11DB7, 0xFFFFFFFF, 0xFFFFFFFF,
     true, true );

    computer.reset();
    computer.process_bytes( buffer, byte_count );
    return computer.checksum();
}
Пример #2
0
 uintmax_t checksum() const
 {
     return crc_.checksum();
 }
Пример #3
0
 void reset()
 {
     crc_.reset();
 }
Пример #4
0
 void process_bytes(const void* buffer, size_t byte_count)
 {
     crc_.process_bytes(buffer, byte_count);
 }