hash

package standard library
go1.24rc3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package hash implements hash functions used in the compiler toolchain.

Index

Constants

View Source
const (
	// Size32 is the size of the 32-byte hash checksum.
	Size32 = 32
	// Size20 is the size of the 20-byte hash checksum.
	Size20 = 20
	// Size16 is the size of the 16-byte hash checksum.
	Size16 = 16
)

Variables

This section is empty.

Functions

func New16

func New16() hash.Hash

New16 returns a new hash.Hash computing the 16 bytes hash checksum.

func New20

func New20() hash.Hash

New20 returns a new hash.Hash computing the 20 bytes hash checksum.

func New32

func New32() hash.Hash

New32 returns a new hash.Hash computing the 32 bytes hash checksum.

func Sum16

func Sum16(data []byte) [Size16]byte

Sum16 returns the 16 bytes checksum of the data.

func Sum20

func Sum20(data []byte) [Size20]byte

Sum20 returns the 20 bytes checksum of the data.

func Sum32

func Sum32(data []byte) [Size32]byte

Sum32 returns the 32 bytes checksum of the data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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