kencode

Crc8

open class Crc8(poly: Int = 7, init: Int = 0, refin: Boolean = false, refout: Boolean = false, xorOut: Int = 0) : Checksum(source)

CRC-8/SMBUS implementation.

Inheritors

Constructors

Crc8

constructor(poly: Int = 7, init: Int = 0, refin: Boolean = false, refout: Boolean = false, xorOut: Int = 0)(source)

Types

Link copied to clipboard
object Default : Crc8

Default CRC-8/SMBUS instance.

Properties

size

open override val size: Int(source)

Number of bytes produced by digest.

Functions

digest

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

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

Link copied to clipboard

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