Function qt_core::q_checksum_2a

source ·
pub unsafe fn q_checksum_2a(s: *const c_char, len: c_uint) -> 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).

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 ISO 3309 (Qt::ChecksumIso3309).

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