hashing

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: Apache-2.0, BSD-2-Clause Imports: 11 Imported by: 5

Documentation

Index

Constants

View Source
const HashSize = sha256.Size

Variables

View Source
var NilHash = &nilHash

Functions

func HashInList

func HashInList(h *HashValue, list []*HashValue) bool

Types

type HashValue

type HashValue [HashSize]byte

func HashData

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

func HashDataBlake2b

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

func HashDataSha3

func HashDataSha3(data ...[]byte) *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) Bytes

func (h *HashValue) Bytes() []byte

func (*HashValue) Clone

func (h *HashValue) Clone() *HashValue

func (*HashValue) Equal

func (h *HashValue) Equal(h1 *HashValue) bool

func (*HashValue) MarshalJSON

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

func (*HashValue) Read

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

func (*HashValue) Short

func (h *HashValue) Short() string

func (*HashValue) Shortest

func (h *HashValue) Shortest() string

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

type HashableBytes

type HashableBytes []byte

Jump to

Keyboard shortcuts

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