MAXIM

fun MAXIM(data: ByteArray, offset: Int, length: Int): Int

Calculates CRC-16 MAXIM over given range of bytes from the block of data. It is using the 0x8005 polynomial and 0x0000 initial value and XORs output with 0xFFFF.

Input data and output CRC are reversed.

See: http://reveng.sourceforge.net/crc-catalogue/16.htm#crc.cat.crc-16-maxim

Return

the CRC-16 MAXIM.

Parameters

data

The input data block for computation.

offset

Offset from where the range starts.

length

Length of the range in bytes.