hashing

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 9 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const HashSize = 32

Variables

View Source
var NilHash = HashValue{}

Functions

This section is empty.

Types

type HashValue

type HashValue [HashSize]byte

func HashData

func HashData(data ...[]byte) HashValue

HashData Blake2b

func HashDataBlake2b

func HashDataBlake2b(data ...[]byte) (ret HashValue)

func HashKeccak added in v1.0.3

func HashKeccak(data ...[]byte) (ret HashValue)

func HashSha3 added in v0.1.0

func HashSha3(data ...[]byte) (ret HashValue)

func HashStrings

func HashStrings(str ...string) HashValue

func HashValueFromBytes

func HashValueFromBytes(b []byte) (ret HashValue, err error)

func HashValueFromHex added in v0.3.0

func HashValueFromHex(s string) (HashValue, error)

func MustHashValueFromHex added in v1.0.3

func MustHashValueFromHex(s string) HashValue

func PseudoRandomHash added in v1.0.3

func PseudoRandomHash(rnd *rand.Rand) HashValue

func (HashValue) Bytes

func (h HashValue) Bytes() []byte

func (HashValue) Hex added in v0.3.0

func (h HashValue) Hex() string

func (*HashValue) MarshalJSON

func (h *HashValue) MarshalJSON() ([]byte, error)

func (*HashValue) Read

func (h *HashValue) Read(r io.Reader) error

func (HashValue) String

func (h HashValue) String() string

func (*HashValue) UnmarshalJSON

func (h *HashValue) UnmarshalJSON(buf []byte) error

func (*HashValue) Write

func (h *HashValue) Write(w io.Writer) error

Jump to

Keyboard shortcuts

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