CRC functions

Header: #include <mrpt/system/crc.h>.

Library: [mrpt-system]

// global functions

uint16_t mrpt::system::compute_CRC16(const std::vector<uint8_t>& data, const uint16_t gen_pol = 0x8005);

uint16_t mrpt::system::compute_CRC16(
    const uint8_t* data,
    const size_t len,
    const uint16_t gen_pol = 0x8005
    );

uint32_t mrpt::system::compute_CRC32(
    const std::vector<uint8_t>& data,
    const uint32_t gen_pol = 0xEDB88320L
    );

uint32_t mrpt::system::compute_CRC32(
    const uint8_t* data,
    const size_t len,
    const uint32_t gen_pol = 0xEDB88320L
    );

Global Functions

uint16_t mrpt::system::compute_CRC16(
    const std::vector<uint8_t>& data,
    const uint16_t gen_pol = 0x8005
    )

Computes the CRC16 checksum of a block of data.

uint16_t mrpt::system::compute_CRC16(
    const uint8_t* data,
    const size_t len,
    const uint16_t gen_pol = 0x8005
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

uint32_t mrpt::system::compute_CRC32(
    const std::vector<uint8_t>& data,
    const uint32_t gen_pol = 0xEDB88320L
    )

Computes the CRC32 checksum of a block of data.

uint32_t mrpt::system::compute_CRC32(
    const uint8_t* data,
    const size_t len,
    const uint32_t gen_pol = 0xEDB88320L
    )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.