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

Link copied to clipboard
constructor(poly: Int = 7, init: Int = 0, refin: Boolean = false, refout: Boolean = false, xorOut: Int = 0)

Types

Link copied to clipboard
object Default : Crc8

Default CRC-8/SMBUS 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.

Crc8

constructor(poly: Int = 7, init: Int = 0, refin: Boolean = false, refout: Boolean = false, xorOut: Int = 0)(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.