kencode

Crc16

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

CRC-16/X-25 implementation.

Inheritors

Constructors

Link copied to clipboard
constructor(poly: Int = 4129, init: Int = 65535, refin: Boolean = true, refout: Boolean = true, xorOut: Int = 65535)

Types

Link copied to clipboard
object Default : Crc16

Default CRC-16/X-25 instance.

Properties

Link copied to clipboard
open override val size: Int

Number of bytes produced by digest.

Functions

Link copied to clipboard

Wraps this Checksum as a PayloadTransform that appends the digest on encode and strips and verifies it on decode.

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

Computes the checksum of data and returns it as a size-byte array.

Crc16

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

digest

open override fun digest(data: ByteArray): ByteArray(source)

Computes the checksum of data and returns it as a size-byte array.

size

open override val size: Int(source)

Number of bytes produced by digest.