hashing

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: Apache-2.0, BSD-2-Clause Imports: 9 Imported by: 5

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 HashSha3 added in v0.1.0

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

func HashStrings

func HashStrings(str ...string) HashValue

func HashValueFromBase58

func HashValueFromBase58(s string) (HashValue, error)

func HashValueFromBytes

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

func RandomHash

func RandomHash(rnd *rand.Rand) HashValue

func (HashValue) Base58 added in v0.2.0

func (h HashValue) Base58() string

func (HashValue) Bytes

func (h HashValue) Bytes() []byte

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