A class for calculating the CRC32 checksum from arbitrary data.
More...
#include <crc32.hpp>
|
|
| CRC32 () |
| | Initialize an empty CRC32 checksum.
|
| |
|
void | reset () |
| | Reset the checksum claculation.
|
| |
| void | update (const uint8_t &data) |
| | Update the current checksum caclulation with the given data.
|
| |
| template<typename Type> |
| void | update (const Type &data) |
| | Update the current checksum caclulation with the given data.
|
| |
| template<typename Type> |
| void | update (const Type *data, std::size_t size) |
| | Update the current checksum caclulation with the given data.
|
| |
| uint32_t | finalize () const |
| |
|
| template<typename Type> |
| static uint32_t | calculate (const Type *data, std::size_t size) |
| | Calculate the checksum of an arbitrary data array.
|
| |
A class for calculating the CRC32 checksum from arbitrary data.
- See also
- http://forum.arduino.cc/index.php?topic=91179.0
◆ calculate()
template<typename Type>
| static uint32_t CRC32::calculate |
( |
const Type * | data, |
|
|
std::size_t | size ) |
|
inlinestatic |
Calculate the checksum of an arbitrary data array.
- Parameters
-
| Type | The data type to read. |
| data | A pointer to the data to add to the checksum. |
| size | The size of the data to add to the checksum. |
- Returns
- the calculated checksum.
◆ finalize()
| uint32_t CRC32::finalize |
( |
| ) |
const |
- Returns
- the caclulated checksum.
◆ update() [1/3]
template<typename Type>
| void CRC32::update |
( |
const Type & | data | ) |
|
|
inline |
Update the current checksum caclulation with the given data.
- Parameters
-
| Type | The data type to read. |
| data | The data to add to the checksum. |
◆ update() [2/3]
template<typename Type>
| void CRC32::update |
( |
const Type * | data, |
|
|
std::size_t | size ) |
|
inline |
Update the current checksum caclulation with the given data.
- Parameters
-
| Type | The data type to read. |
| data | The array to add to the checksum. |
| size | Size of the array to add. |
◆ update() [3/3]
| void CRC32::update |
( |
const uint8_t & | data | ) |
|
Update the current checksum caclulation with the given data.
- Parameters
-
| data | The data to add to the checksum. |
The documentation for this class was generated from the following files: