tmhash

package
v100.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Size      = sha256.Size
	BlockSize = sha256.BlockSize
)
View Source
const (
	TruncatedSize = 20
)

Variables

This section is empty.

Functions

func New

func New() hash.Hash

New returns a new hash.Hash.

func NewTruncated

func NewTruncated() hash.Hash

NewTruncated returns a new hash.Hash.

func Sum

func Sum(bz []byte) []byte

Sum returns the SHA256 of the bz.

func SumMany

func SumMany(data []byte, rest ...[]byte) []byte

SumMany takes at least 1 byteslice along with a variadic number of other byteslices and produces the SHA256 sum from hashing them as if they were 1 joined slice.

func SumTruncated

func SumTruncated(bz []byte) []byte

SumTruncated returns the first 20 bytes of SHA256 of the bz.

Types

This section is empty.

Jump to

Keyboard shortcuts

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