Calculates the CRC32 for all data passed to Update.
This class is more efficient than the CRC32 C functions since it doesn't finalize the value each time it is appended to.
Public Member Functions | |
| void | Update (span< const std::byte > data) |
| Updates the CRC with the provided data. | |
| void | Update (std::byte data) |
| Updates the CRC with the provided byte. | |
| uint32_t | value () const |
| Returns the value of the CRC32 for all data passed to Update. | |
| void | clear () |
| Resets the CRC to the initial value. | |
Static Public Member Functions | |
| static uint32_t | Calculate (span< const std::byte > data) |
| Calculates the CRC32 for the provided data and returns it as a uint32_t. | |
|
inlinestatic |
Calculates the CRC32 for the provided data and returns it as a uint32_t.
To update a CRC in multiple pieces, use an instance of the Crc32 class.