jancajthaml-go / crc64

64bit variable polynomial cyclic redundancy check algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

64Bit Cyclic redundancy check

Go Report Card

CRC which encode messages by adding a fixed-length check value, for the purpose of error detection in communication networks, it can provide quick and reasonable assurance of the integrity of messages delivered.

However, it is not suitable for protection against intentional alteration of data.

Implementation is tableless with variable 64bit polynomial.

Performance

BenchmarkCrcSmall  60.54 MB/s  0 B/op  0 allocs/op
BenchmarkCrcLarge  26.07 MB/s  0 B/op  0 allocs/op

Usage

import "github.com/jancajthaml-go/crc64"

data := []byte("abcdefgh")
poly := 0x04C11DB7
init := 0xFFFFFFFF
xorout := 0xFFFFFFFF

crc64.Checksum(data, poly, init, xorout) // 0x5024EC61

About

64bit variable polynomial cyclic redundancy check algorithm

License:The Unlicense


Languages

Language:Go 93.3%Language:Makefile 6.7%