Crc32

object Crc32

CRC-32 (IEEE 802.3, polynomial 0xEDB88320), the checksum ZIP stores for every entry. Table-driven, pure Kotlin, same result on every target.

Crc32.of("123456789".encodeToByteArray())   // 0xCBF43926

Functions

Link copied to clipboard
fun of(bytes: ByteArray, from: Int = 0, to: Int = bytes.size): Long

Checksum of bytes between from (inclusive) and to (exclusive).