kencode

Crc16

open class Crc16(poly: Int = 4129, init: Int = 65535, refin: Boolean = true, refout: Boolean = true, xorOut: Int = 65535) : Crc(source)

16-bit CRC; CRC-16/X-25 by default.

Inheritors

Constructors

Crc16

constructor(poly: Int = 4129, init: Int = 65535, refin: Boolean = true, refout: Boolean = true, xorOut: Int = 65535)(source)

Types

Link copied to clipboard
object Default : Crc16

CRC-16/X-25.

Properties

Link copied to clipboard
open override val size: Int

Digest size in bytes.

Functions

Link copied to clipboard

Appends the digest on encode; verifies and strips it on decode.

Link copied to clipboard
open override fun digest(data: ByteArray): ByteArray

Returns the size-byte digest of data.