BloombergLP::bdlde::Crc32c::calculate

Return the CRC32-C checksum of the specified data.

Synopsis

Declared in <bdlde_crc32c.h>

static
unsigned int
calculate(
    void const* data,
    std::size_t length,
    unsigned int crc = k_NULL_CRC32C);

Description

Return the CRC32-C value calculated for the specified data over the specified length number of bytes, using the optionally specified crc value as the starting point for the calculation. Note that if data is 0, then length also must be 0.

Return Value

the CRC32-C checksum of the specified data

Parameters

NameDescription
datamemory region to checksum
lengthnumber of bytes in data
crcstarting CRC32-C value for the calculation