checksum

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ANSI16Table = MakeTable(0x8005, 16)
View Source
var ATM8Table = MakeTable(0x7, 8)
View Source
var IEEELETable = MakeTable(0xedb88320, 32) // TODO: is this IEEE?
View Source
var Poly04c11db7Table = MakeTable(0x04c11db7, 32) // TODO: is this IEEE?

Functions

This section is empty.

Types

type CRC

type CRC struct {
	Bits    int
	Current uint
	Table   Table
}

CRC implements hash.Hash

func (*CRC) BlockSize

func (c *CRC) BlockSize() int

func (*CRC) Reset

func (c *CRC) Reset()

func (*CRC) Size

func (c *CRC) Size() int

func (*CRC) Sum

func (c *CRC) Sum(b []byte) []byte

func (*CRC) Write

func (c *CRC) Write(p []byte) (n int, err error)

type IPv4

type IPv4 struct {
	// contains filtered or unexported fields
}

IPv4 implements hash.Hash

func (*IPv4) BlockSize

func (c *IPv4) BlockSize() int

func (*IPv4) Reset

func (c *IPv4) Reset()

func (*IPv4) Size

func (c *IPv4) Size() int

func (*IPv4) Sum

func (c *IPv4) Sum(b []byte) []byte

func (*IPv4) Write

func (c *IPv4) Write(p []byte) (n int, err error)

type Table

type Table [256]uint

func MakeTable

func MakeTable(poly uint, bits int) Table

Jump to

Keyboard shortcuts

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