# package crc64
`import "hash/crc64"`
Package crc64 implements the 64-bit cyclic redundancy check, or CRC-64, checksum. See [http://en.wikipedia.org/wiki/Cyclic_redundancy_check](http://en.wikipedia.org/wiki/Cyclic_redundancy_check) for information.
## Index
* [Constants](#pkg-constants)
* [type Table](#Table)
* [func MakeTable(poly uint64) \*Table](#MakeTable)
* [func Checksum(data []byte, tab \*Table) uint64](#Checksum)
* [func Update(crc uint64, tab \*Table, p []byte) uint64](#Update)
* [func New(tab \*Table) hash.Hash64](#New)
## Constants
```
const (
// ISO 3309定义的ISO多项式,用于HDLC
ISO = 0xD800000000000000
// ECMA 182定义的ECMA多项式
ECMA = 0xC96C5795D7870F42
)
```
预定义的多项式。
```
const Size = 8
```
CRC-64校验和的字节数。
## type [Table](https://github.com/golang/go/blob/master/src/hash/crc64/crc64.go#L25 "View Source")
```
type Table [256]uint64
```
长度256的uint64切片,代表一个用于高效运作的多项式。
### func [MakeTable](https://github.com/golang/go/blob/master/src/hash/crc64/crc64.go#L28 "View Source")
```
func MakeTable(poly uint64) *Table
```
返回一个代表poly指定的多项式的\*Table。
## func [Checksum](https://github.com/golang/go/blob/master/src/hash/crc64/crc64.go#L87 "View Source")
```
func Checksum(data []byte, tab *Table) uint64
```
返回数据data使用tab代表的多项式计算出的CRC-64校验和。
## func [Update](https://github.com/golang/go/blob/master/src/hash/crc64/crc64.go#L69 "View Source")
```
func Update(crc uint64, tab *Table, p []byte) uint64
```
返回将切片p的数据采用tab表示的多项式添加到crc之后计算出的新校验和。
## func [New](https://github.com/golang/go/blob/master/src/hash/crc64/crc64.go#L52 "View Source")
```
func New(tab *Table) hash.Hash64
```
创建一个使用tab代表的多项式计算CRC-64校验和的hash.Hash64接口。
- 库
- package achive
- package tar
- package zip
- package bufio
- package builtin
- package bytes
- package compress
- package bzip2
- package flate
- package gzip
- package lzw
- package zlib
- package container
- package heap
- package list
- package ring
- package crypto
- package aes
- package cipher
- package des
- package dsa
- package ecdsa
- package elliptic
- package hmac
- package md5
- package rand
- package rc4
- package rsa
- package sha1
- package sha256
- package sha512
- package subtle
- package tls
- package x509
- package pkix
- package database
- package sql
- package driver
- package encoding
- package ascii85
- package asn1
- package base32
- package base64
- package binary
- package csv
- package gob
- package hex
- package json
- package pem
- package xml
- package errors
- package expvar
- package flag
- package fmt
- package go
- package doc
- package format
- package parser
- package printer
- package hash
- package adler32
- package crc32
- package crc64
- package fnv
- package html
- package template
- package image
- package color
- package palette
- package draw
- package gif
- package jpeg
- package png
- package index
- package suffixarray
- package io
- package ioutil
- package log
- package syslog
- package math
- package big
- package cmplx
- package rand
- package mime
- package multipart
- package net
- package http
- package cgi
- package cookiejar
- package fcgi
- package httptest
- package httputil
- package pprof
- package mail
- package rpc
- package jsonrpc
- package smtp
- package textproto
- package url
- package os
- package exec
- package signal
- package user
- package path
- package filepath
- package reflect
- package regexp
- package runtime
- package cgo
- package debug
- package pprof
- package race
- package sort
- package strconv
- package strings
- package sync
- package atomic
- package text
- package scanner
- package tabwriter
- package template
- package time
- package unicode
- package utf16
- package utf8
- package unsafe