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_word32 TABLE_04C11DB7 Precalculated table

Methods

Return Type Name Summary
p_word32 generateTable Generates v_word32 table[256] for polynomial
v_word32 calc Calculate CRC32 value for buffer of defined size

CRC32::TABLE_04C11DB7

Precalculated table

static const p_word32 TABLE_04C11DB7

CRC32::generateTable

Generates v_word32 table[256] for polynomial

static p_word32 generateTable(v_word32 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_word32)

static v_word32 calc(const void *buffer, v_int32 size, v_word32 crc = 0, v_word32 initValue = 0xFFFFFFFF, v_word32 xorOut = 0xFFFFFFFF, p_word32 table = TABLE_04C11DB7)