crc

package
v0.0.0-...-12667e7 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode8Array

func Decode8Array(input []byte) ([]byte, error)

Function that strips prepended crc8 checksum from []byte and verifies it, if valid returns the byte array without the checksum, if invalid returns nil

func Decode8Chunks

func Decode8Chunks(input [][]byte) ([][]byte, int)

Function that goes over [][]byte and takes prepended crc8 from each byte array and verifies it, if invalid it nullifies the byte array, if valid it strips the checksum and returns the byte array

func Encode16

func Encode16(input []byte) uint16

Function which does crc16 checksum on input byte array

func Encode32

func Encode32(input []byte) uint32

Function which does crc32 checksum on input byte array

func Encode8

func Encode8(input []byte) byte

Function which does crc8 checksum on input byte array

func Encode8Chunks

func Encode8Chunks(input [][]byte) [][]byte

Function that goes over [][]byte and prepends crc8 checksum to each byte array

func Match16

func Match16(input []byte, checksum uint16) bool

Check if the byte and privided crc16 checksum is valid

func Match32

func Match32(input []byte, checksum uint32) bool

Check if the byte and privided crc32 checksum is valid

func Match8

func Match8(input []byte, checksum byte) bool

Check if the byte and privided crc8 checksum is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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