...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::augmented_crc — Compute the CRC of a memory block, with any augmentation provided by user.
// In header: <boost/crc.hpp> template<std::size_t Bits, typename::boost::uint_t< Bits >::fast TruncPoly> uint_t< Bits >::fast augmented_crc(void const * buffer, std::size_t byte_count, typename uint_t< Bits >::fast initial_remainder = 0u);
Computes the polynomial remainder of a CRC run, assuming that buffer and byte_count describe a memory block representing the polynomial dividend. The first byte is considered the highest order, going down for subsequent bytes. Within a byte, the highestorder bit is read first (corresponding to RefIn = False
in the RMCA). Check the other parts of this function's documentation to see how a checksum can be gained and/or used.
Note  

Augmentedstyle CRC runs use straightup modulo2 polynomial division. Since data is being read bytewise, a table of precomputed remainder changes (as XOR masks) can be used to speed computation. Reading just a memory block will yield an interim remainder, and not the final checksum. To get that checksum, allocate Bits / Another way to perform a check is use the zerobyte extension method, but replace the zero values with your separatelygiven checksum. The checksum must be loaded in bigendian order. Here corruption, in either the data block or the given checksum, is confirmed if the return value is not zero. The two checksum techniques assume the CRCrun is performed bitwise, while this function works bytewise. That means that the techniques can be used only if 
Parameters: 


Template Parameters: 


Requires: 
0 < Bits <= 

Returns: 
The interim remainder, if no augmentation is used. A special value if augmentation is used (see the notes). No output processing is done on the value. (In RMCA terms, RefOut is 