invoke

operator fun invoke(width: Int, polynomial: ULong, init: ULong, xorOut: ULong, reflectIn: Boolean = false, reflectOut: Boolean = false): CRC

Creates a CRC with the given parameters.

Parameters

width

the width of the CRC in bits. Must be between 1 and 64 bits.

polynomial

the polynomial used to compute the CRC.

init

the initial value of the CRC.

xorOut

the value to XOR with the result to get the final CRC.

reflectIn

whether to reflect the input bytes before computing the CRC.

reflectOut

whether to reflect the output bytes after computing the CRC.