|
NX 1.0.3
niu2x's base c++ helper library
|
This class NX_API describes crc 32 algorithm. 更多...
#include <digest.h>
Public 成员函数 | |
| CRC32 () | |
| void | update (const uint8_t *buf, size_t len) |
| put data | |
| uint32_t | get_value () const |
| get crc32 value | |
This class NX_API describes crc 32 algorithm.
uint8_t digest[16];
CRC32 crc32;
crc32.update("hello", 5);
uint32_t checksum = crc32.get_value();
| nx::digest::CRC32::CRC32 | ( | ) |
| uint32_t nx::digest::CRC32::get_value | ( | ) | const |
get crc32 value
| void nx::digest::CRC32::update | ( | const uint8_t * | buf, |
| size_t | len | ||
| ) |
put data
| [in] | buf | The buffer |
| [in] | len | The length |