Standard library / hash/crc64
hash/crc64.New()
Create a streaming checksum with the selected polynomial. The digest bytes from Sum use big-endian order; Sum32 or Sum64 returns a number. The returned object supports binary state marshaling. This is not a cryptographic authentication primitive. Expected stdout: '995dc9bbdf1939fa\n'.
Formal Syntax & Structure
go syntaxgo
func New(tab *Table) hash.Hash64Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| tab | *Table | Read-only lookup table for the chosen polynomial. |
Return Value
hash.Hash64
Fresh incremental 64-bit hash.
Working Example
Example Snippetgo
package main
import ( "fmt" "hash/crc64")
func main() { h := crc64.New(crc64.MakeTable(crc64.ECMA)) h.Write([]byte("1234")) h.Write([]byte("56789")) fmt.Printf("%x\n", h.Sum(nil))}