Help us shape the future of Go! Take the 2026 Go Developer Survey

sha1

package
v4.96.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const BlockSize = 64

The blocksize of SHA-1 in bytes.

View Source
const Size = 20

The size of a SHA-1 checksum in bytes.

Variables

This section is empty.

Functions

func BEAppendUint32

func BEAppendUint32(b []byte, v uint32) []byte

func BEAppendUint64

func BEAppendUint64(b []byte, v uint64) []byte

func BEPutUint32

func BEPutUint32(b []byte, v uint32)

func BEPutUint64

func BEPutUint64(b []byte, v uint64)

func BEUint32

func BEUint32(b []byte) uint32

func BEUint64

func BEUint64(b []byte) uint64

func New

func New() hash.Hash

New returns a new hash.Hash computing the SHA1 checksum. The Hash also implements encoding.BinaryMarshaler, encoding.BinaryAppender and encoding.BinaryUnmarshaler to marshal and unmarshal the internal state of the hash.

func Sum

func Sum(data []byte) [Size]byte

Sum returns the SHA-1 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