crc8

package
v1.1.0-alpha2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Size = 1

The size of a CRC-8 checksum in bytes.

Variables

View Source
var (
	DOWCRC = crc8.DOW
)

Predefined polynomials.

Functions

func Checksum

func Checksum(data []byte, m *Model) uint8

Checksum returns the CRC-8 checksum of data using the polynomial, and parameters represented by the Model.

func New

func New(m *Model) hash.Hash8

New creates a new hash.Hash8 computing the CRC-8 checksum using the polynomial represented by the Model.

func NewFromInst

func NewFromInst(inst *crcutil.Inst[uint8]) hash.Hash8

NewFromInst creates a hash.Hash8 from an crcutil.Inst.

Types

type Model

type Model = crc8.Model

func MakeTable deprecated

func MakeTable(m *Model) *Model

MakeTable used to create a Table constructed from a specified polynomial.

Deprecated: Now it just returns the provided Model to keep the package's API compatible.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL