Skip to content

Kotlin Multiplatform implementation for CRC calculator

Notifications You must be signed in to change notification settings

semenoh/crcKalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crcKalc

Kotlin Multiplatform implementation for CRC calculator

Usage

fun main(args: Array<String>){
    val bytes = "123456789".toByteArray(java.nio.charset.Charset.forName("ASCII"))
    val params = com.crccalc.predefined.Crc8.maxim
    val crc = com.crccalc.CrcCalculator(params).calculateCrc(bytes)
    val resultHex = crc.toString(16).toUpperCase()
    val expectHex = params.check.toString(16).toUpperCase()
    println("crc for ${bytes.contentToString()} is 0x$resultHex and should be 0x$expectHex")
}

About

Kotlin Multiplatform implementation for CRC calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages