Standard library / hash/crc64
hash/crc64.Checksum()
Compute a complete checksum with the selected table. Both sides must agree on CRC parameters and byte sequence. This is not a cryptographic authentication primitive. Expected stdout: '995dc9bbdf1939fa\n'.
Formal Syntax & Structure
go syntaxgo
func Checksum(data []byte, tab *Table) uint64Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| data | []byte | Bytes whose checksum is computed. |
| tab | *Table | Read-only lookup table for the chosen polynomial. |
Return Value
uint64
64-bit unsigned result.
Working Example
Example Snippetgo
package main
import ( "fmt" "hash/crc64")
func main() { fmt.Printf("%016x\n", crc64.Checksum([]byte("123456789"), crc64.MakeTable(crc64.ECMA))) }