# CRC.hpp
This File On Github
Ask A Question
API: latest
module: oatpp
#include "oatpp/algorithm/CRC.hpp"
# CRC32
Implementation of CRC-32. Cyclic redundancy check algorithm.
namespace oatpp { namespace algorithm {
class CRC32 {}
}}
# Fields
Type | Name | Summary |
---|---|---|
const p_uint32 | TABLE_04C11DB7 | Precalculated table |
# Methods
Return Type | Name | Summary |
---|---|---|
p_uint32 | generateTable | Generates v_uint32 table[256] for polynomial |
v_uint32 | calc | Calculate CRC32 value for buffer of defined size |
# CRC32::TABLE_04C11DB7
Precalculated table
static const p_uint32 TABLE_04C11DB7
# CRC32::generateTable
Generates v_uint32 table[256] for polynomial
static p_uint32 generateTable(v_uint32 poly)
# CRC32::calc
Calculate CRC32 value for buffer of defined size
- @param buffer
- @param size
- @param crc
- @param initValue
- @param xorOut
- @param table
- @return - CRC32 value (v_uint32)
static v_uint32 calc(const void *buffer, v_buff_size size, v_uint32 crc = 0, v_uint32 initValue = 0xFFFFFFFF, v_uint32 xorOut = 0xFFFFFFFF, p_uint32 table = TABLE_04C11DB7)