Standard library / hash/crc64

hash/crc64.MakeTable()

Build or obtain a lookup table for a reversed polynomial. Do not mutate the returned table; reuse it for matching checksum calculations. This is not a cryptographic authentication primitive. Expected stdout: '995dc9bbdf1939fa\n'.

Formal Syntax & Structure

go syntaxgo
func MakeTable(poly uint64) *Table

Parameters & Attributes

NameTypeDescription
polyuint64Polynomial in reversed, least-significant-bit-first form.

Return Value

*Table

Lookup table; do not modify it.

Working Example

Example Snippetgo
package main
import (  "fmt"  "hash/crc64")
func main() {  t := crc64.MakeTable(crc64.ECMA)  fmt.Printf("%016x\n", crc64.Checksum([]byte("123456789"), t))}
Go Reference