kencode

Checksum

interface Checksum(source)

Generic checksum interface that produces a fixed number of bytes.

Inheritors

Properties

Link copied to clipboard
abstract 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
abstract fun digest(data: ByteArray): ByteArray

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

digest

abstract fun digest(data: ByteArray): ByteArray(source)

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

size

abstract val size: Int(source)

Number of bytes produced by digest.