Function qt_core::q_checksum_3a

source ·
pub unsafe fn q_checksum_3a(
    s: *const c_char,
    len: c_uint,
    standard: ChecksumType
) -> u16
Expand description

Returns the CRC-16 checksum of the first len bytes of data.

Calls C++ function: quint16 qChecksum(const char* s, unsigned int len, Qt::ChecksumType standard).

C++ documentation:

Returns the CRC-16 checksum of the first len bytes of data.

The checksum is independent of the byte order (endianness) and will be calculated accorded to the algorithm published in standard.

Note: This function is a 16-bit cache conserving (16 entry table) implementation of the CRC-16-CCITT algorithm.

This function was introduced in Qt 5.9.