From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/go/hash%2Fcrc64%2Findex.html | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 devdocs/go/hash%2Fcrc64%2Findex.html (limited to 'devdocs/go/hash%2Fcrc64%2Findex.html') diff --git a/devdocs/go/hash%2Fcrc64%2Findex.html b/devdocs/go/hash%2Fcrc64%2Findex.html new file mode 100644 index 00000000..2a4d782a --- /dev/null +++ b/devdocs/go/hash%2Fcrc64%2Findex.html @@ -0,0 +1,30 @@ +

Package crc64

Overview

Package crc64 implements the 64-bit cyclic redundancy check, or CRC-64, checksum. See https://en.wikipedia.org/wiki/Cyclic_redundancy_check for information.

Index

Package files

crc64.go

Constants

Predefined polynomials.

+
const (
+    // The ISO polynomial, defined in ISO 3309 and used in HDLC.
+    ISO = 0xD800000000000000
+
+    // The ECMA polynomial, defined in ECMA 182.
+    ECMA = 0xC96C5795D7870F42
+)

The size of a CRC-64 checksum in bytes.

+
const Size = 8

func Checksum

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

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

+

func New

func New(tab *Table) hash.Hash64

New creates a new hash.Hash64 computing the CRC-64 checksum using the polynomial represented by the Table. Its Sum method will lay the value out in big-endian byte order. The returned Hash64 also implements encoding.BinaryMarshaler and encoding.BinaryUnmarshaler to marshal and unmarshal the internal state of the hash.

+

func Update

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

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

+

type Table

Table is a 256-word table representing the polynomial for efficient processing.

+
type Table [256]uint64

func MakeTable

func MakeTable(poly uint64) *Table

MakeTable returns a Table constructed from the specified polynomial. The contents of this Table must not be modified.

+

+ © Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.
+ http://golang.org/pkg/hash/crc64/ +

+
-- cgit v1.2.3