crc64jones

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package crc64jones implements a 64-bit cyclic redundancy check, or CRC-64, checksum. Specifically the Jones flavour of it which is used by Redis.

Specification of this CRC64 variant follows: - Name: crc-64-jones - Width: 64 bites - Poly: 0xad93d23594c935a9 - Reflected In: True - Xor_In: 0xffffffffffffffff - Reflected_Out: True - Xor_Out: 0x0 - Check("123456789"): 0xe9c6d914c4b8d9ca

Index

Constants

View Source
const (
	// The Jones polynomial.
	Jones = 0xad93d23594c935a9
)

Predefined polynomials.

Variables

This section is empty.

Functions

func Checksum

func Checksum(data []byte, tab *crc64.Table) uint64

Checksum returns the CRC-64 checksum of data using the polynomial represented by the [Table].

func New

func New() hash.Hash64

New creates a new hash.Hash64 computing the CRC-64 checksum using the Jones polynomial. Its Sum method will lay the value out in little-endian byte order.

func Update

func Update(crc uint64, tab *crc64.Table, p []byte) uint64

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