crc32itu

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

README

GoDoc

crc32 ITU

ITU I.363.5 algorithm (a.k.a. AAL5 CRC) was popularised by BZIP2 but also used in ATM transmissions.

This is not implemented in golang's hash/crc32 package, but can be found hidden in compress/bzip2 and is the equivalent of PHP's hash('crc32', ...).

the algorithm is the same as that in POSIX 1003.2-1992 in Cksum but that stuffs the size into the CRC at the end for extra measure.

Documentation

Index

Constants

View Source
const Size = 4

Variables

This section is empty.

Functions

func Checksum added in v0.1.1

func Checksum(data []byte) uint32

Checksum returns the ITU I.363.5 checksum of data.

func New

func New() hash.Hash32

New returns a new instance of hash.Hash32 that can be used to compute CRC32 values using this standard interface.

func Update added in v0.1.1

func Update(crc uint32, data []byte) uint32

Update returns the result of adding the bytes in p to the crc.

Types

This section is empty.

Jump to

Keyboard shortcuts

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