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

Link copied to clipboard
constructor(poly: Int = 79764919, init: Int = 0xFFFFFFFF.toInt(), refin: Boolean = true, refout: Boolean = true, xorOut: Int = 0xFFFFFFFF.toInt())

Types

Link copied to clipboard
object Default : Crc32

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

Crc32

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