hash

package
v0.0.0-...-1975910 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2013 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package hash provides hashing utilities used by leveldb.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(data []byte, seed uint32) uint32

Hash return hash of the given data.

func MaskCRC32

func MaskCRC32(crc uint32) uint32

MaskCRC32 return a masked representation of crc.

Motivation: it is problematic to compute the CRC of a string that contains embedded CRCs. Therefore we recommend that CRCs stored somewhere (e.g., in files) should be masked before being stored.

func NewCRC32C

func NewCRC32C() hash.Hash32

New creates a new hash.Hash32 computing the CRC-32 checksum using Castagnoli's polynomial.

func UnmaskCRC32

func UnmaskCRC32(masked_crc uint32) uint32

UnmaskCRC32 return the crc whose masked representation is masked_crc.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL