kencode

Crc32

open class Crc32(poly: Int = 79764919, init: Int = 0xFFFFFFFF.toInt(), refin: Boolean = true, refout: Boolean = true, xorOut: Int = 0xFFFFFFFF.toInt()) : Checksum(source)

CRC-32/ISO-HDLC implementation.

Inheritors

Constructors

Crc32

constructor(poly: Int = 79764919, init: Int = 0xFFFFFFFF.toInt(), refin: Boolean = true, refout: Boolean = true, xorOut: Int = 0xFFFFFFFF.toInt())(source)

Types

Link copied to clipboard
object Default : Crc32

Default CRC-32/ISO-HDLC 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.